chore: more debug info

This commit is contained in:
Dominik Meyer 2025-02-07 17:52:24 +01:00
parent d4f76374e7
commit 959dc8966e
Signed by: byterazor
GPG Key ID: EABDA0FD5981BC97

View File

@ -37,22 +37,21 @@ sub lmtp_transfer
$lmtp->mail($transaction->sender->address || "") $lmtp->mail($transaction->sender->address || "")
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 ($!)"; $lmtp->to($lmtp_user) or return DECLINED, "Unable to queue message during to($!)";
$lmtp->data() or return DECLINED, "Unable to queue message ($!)"; $lmtp->data() or return DECLINED, "Unable to queue message during data($!)";
$lmtp->datasend($transaction->header->as_string) $lmtp->datasend($transaction->header->as_string) or return DECLINED, "Unable to queue message during datasend ($!) ";
or return DECLINED, "Unable to queue message ($!)";
$transaction->body_resetpos; $transaction->body_resetpos;
while (my $line = $transaction->body_getline) { while (my $line = $transaction->body_getline) {
$lmtp->datasend($line) $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 $qid = $lmtp->message();
my @list = split(' ', $qid); my @list = split(' ', $qid);
$qid = pop(@list); $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"); $self->log(LOGINFO, "finished queueing");
return OK, "queued as $qid"; return OK, "queued as $qid";