From b1fc4cafc50ea04d824b648d1acbe43e89472f38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ask=20Bj=C3=B8rn=20Hansen?= Date: Wed, 16 Apr 2003 16:45:57 +0000 Subject: [PATCH] Have the qmail-queue plugin add the message-id to the "Queued!" message we send back to the client (to help those odd sendmail using people debug their logs) git-svn-id: https://svn.perl.org/qpsmtpd/trunk@140 958fd67b-6ff1-0310-b445-bb7760255be9 --- Changes | 4 ++++ plugins/queue/qmail-queue | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index 493b233..d63cc1a 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ 0.26-dev + Have the qmail-queue plugin add the message-id to the "Queued!" + message we send back to the client (to help those odd sendmail using + people debug their logs) + Set the process name to "qpsmtpd [1.2.3.4 : host.name.tld]" Fixed timeout bug when the client sent DATA and then stopped before diff --git a/plugins/queue/qmail-queue b/plugins/queue/qmail-queue index 6d2fe73..ec4cd21 100644 --- a/plugins/queue/qmail-queue +++ b/plugins/queue/qmail-queue @@ -70,7 +70,10 @@ sub queue_handler { waitpid($child, 0); my $exit_code = $? >> 8; $exit_code and return(DECLINED, "Unable to queue message ($exit_code)"); - return (OK, "Queued!"); + + my $msg_id = $transaction->header->get('Message-Id') || ''; + $msg_id =~ s/[\r\n].*//s; # don't allow newlines in the Message-Id here + return (OK, "Queued! $msg_id"); } elsif (defined $child) { # Child