From 959dc8966eee28b46b58d188057e971efafc9d52 Mon Sep 17 00:00:00 2001 From: Dominik Meyer Date: Fri, 7 Feb 2025 17:52:24 +0100 Subject: [PATCH] chore: more debug info --- queue/lmtp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/queue/lmtp b/queue/lmtp index ae717a5..eb1cd56 100644 --- a/queue/lmtp +++ b/queue/lmtp @@ -37,22 +37,21 @@ sub lmtp_transfer $lmtp->mail($transaction->sender->address || "") - or return DECLINED, "Unable to queue message ($!)"; - $lmtp->to($lmtp_user) or return DECLINED, "Unable to queue message ($!)"; - $lmtp->data() or return DECLINED, "Unable to queue message ($!)"; - $lmtp->datasend($transaction->header->as_string) - or return DECLINED, "Unable to queue message ($!)"; + or return DECLINED, "Unable to queue message during mail($!)"; + $lmtp->to($lmtp_user) or return DECLINED, "Unable to queue message during to($!)"; + $lmtp->data() or return DECLINED, "Unable to queue message during data($!)"; + $lmtp->datasend($transaction->header->as_string) or return DECLINED, "Unable to queue message during datasend ($!) "; $transaction->body_resetpos; while (my $line = $transaction->body_getline) { $lmtp->datasend($line) - or return DECLINED, "Unable to queue message ($!)"; + or return DECLINED, "Unable to queue message during datasendbody($!)"; } - $lmtp->dataend() or return DECLINED, "Unable to queue message ($!)"; + $lmtp->dataend() or return DECLINED, "Unable to queue message during dataend($!)"; my $qid = $lmtp->message(); my @list = split(' ', $qid); $qid = pop(@list); - $lmtp->quit() or return DECLINED, "Unable to queue message ($!)"; + $lmtp->quit() or return DECLINED, "Unable to queue message during quit($!)"; $self->log(LOGINFO, "finished queueing"); return OK, "queued as $qid";