From 9f404f52bf11bb08c44160f2bb9a9fc9feb3e8c2 Mon Sep 17 00:00:00 2001 From: tpoindessous Date: Fri, 24 Jan 2014 15:11:39 +0100 Subject: [PATCH] Add the message id in log There is no message id in logfile so it's difficult to debug a message sent through qpsmtpd. --- plugins/queue/smtp-forward | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/queue/smtp-forward b/plugins/queue/smtp-forward index 5491569..3fbb6d9 100644 --- a/plugins/queue/smtp-forward +++ b/plugins/queue/smtp-forward @@ -73,7 +73,11 @@ sub hook_queue { or return (DECLINED, "Unable to queue message ($!)"); } $smtp->dataend() or return (DECLINED, "Unable to queue message ($!)"); + my $qid = $smtp->message(); + my @list = split(' ', $qid); + $qid = pop(@list); + $smtp->quit() or return (DECLINED, "Unable to queue message ($!)"); $self->log(LOGINFO, "finished queueing"); - return (OK, "Queued!"); + return (OK, "queued as $qid"); }