Dear postfix users community,

Sorry for asking another beginner question. I've seen solutions online for this, but only one with caveats.

One of my setups involves a forwarding SMTP that handles external domains, that then forwards them to some other internal mailbox on a different machine. To do that, I use postfix with virtual_alias_maps to forward it. I've seen that use case also used to implement catch-alls.

The problem: postfix sets Delivered-To for the final target address it forwards to. However, it doesn't seem to keep the original envelope-to.

I've seen this solution float around:

main.cf: smtpd_recipient_restrictions = [...], check_recipient_access pcre:/etc/postfix/prepend_header

/etc/postfix/prepend_header: /(.+)/    PREPEND X-Envelope-To: $1

However, that seems to cause problems when e.g. the original mail was sent to multiple inboxes at once, e.g. via BCC to multiple ones, and seems to result in duplicate X-Envelope-To headers. (To be honest I haven't tried it myself, but I've seen complaints claiming that.)

So is there some nice canonical solution?

Regards,

ell1e

_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to