If postfix is adding it, your not using lmtp.

Only virtual and local adds it in postfix, lmtp is a symlink to smtp and does not add that header. If your somehow delivering the mail through local, then forwarding it again via lmtp, that would be a bad thing. Maybe look how you have spam/virus/... configured? Are they configured in some kind of loopback config using a lda that it shouldn't be using? I do know in older postfix versions (I haven't tested it in 3.x) if an email came into my postfix server with a return-path header, postfix would strip it out before delivering it via lmtp/smtp



Quoting Michael Peddemors <mich...@linuxmagic.com>:

On 2024-01-21 04:43, Patrick Domack via dovecot wrote:

Quoting Benny Pedersen <m...@junc.eu>:

Christian Kivalo skrev den 2024-01-21 02:08:

Just wish LMTP would not end up with duplicate Return-Path headers..
Duplicate return path headers? I don't see them on my system. All mail is sent from postfix to dovecot with lmtp

it simply works better with lda ? :)

return-path is std postfix envelope sender pseudo header, bugs ?

it's not a pseudo header, it is defined starting in rfc-822, as to be added at time of delievery.

The LDA should add it, postfix lda add it (virtual/local) and dovecots do also (lda/lmtp)

I have used most postfix versions from 2.1 to 3.8 and dovecot lda and lmtp and haven't have never seen duplicate headers

Maybe it is just a Zimbra thing.. but we definitely see this occurring in the wild.. Maybe just poor configuration, but of course as per RFC, to be clear, is only supposed to be added by the 'final' delivery mechanism.

So, the logic that implies duplicate Return-Path either indicates a broken system, looping issue, or email replay fails in those situations.

Postfix adds...

Return-path: <REDACT>
Envelope-to: <REDACT>
Delivery-date: Fri, 06 Oct 2023 08:56:07 -0300
<Trace Headers>

After which it get handled by lmtp, which adds the following..

Return-Path: <REDACT>
Delivered-To: <REDACT>
Received: from <SVR NAME>
by <SVR NAME> with LMTP
id CMvDLNf1H2UcHQAAJRWI5g
(envelope-from <REDACT>)
for <REDACT>; Fri, 06 Oct 2023 08:56:07 -0300

I guess this is a double issue, postfix should know that in this case, it is not the final delivery, lmtp is.. and lmtp should probably either remove the previous Return-Path, or copy that to a new header.. since it was not supposed to be there (but that has ramifications too.


--
"Catch the Magic of Linux..."
------------------------------------------------------------------------
Michael Peddemors, President/CEO LinuxMagic Inc.
Visit us at http://www.linuxmagic.com @linuxmagic
A Wizard IT Company - For More Info http://www.wizard.ca
"LinuxMagic" a Reg. TradeMark of Wizard Tower TechnoServices Ltd.
------------------------------------------------------------------------
604-682-0300 Beautiful British Columbia, Canada

_______________________________________________
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org



_______________________________________________
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org

Reply via email to