Add the message id in log

There is no message id in logfile so it's difficult to debug a message sent through qpsmtpd.
This commit is contained in:
tpoindessous 2014-01-24 15:11:39 +01:00
parent 0c41c01274
commit 9f404f52bf

View File

@ -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");
}