Many people prefer to use LMTP for delivery from postfix for better efficiency but X-Original-to header support still missing after many years. One affect of this is need to set sieve_vacation_dont_check_recipient = yes which violate Sieve standard and cause auto-replyies sent to messages that should not happen. Or abandon LMTP. or abandon postfix?? So while feature request is stalled are there any realistic workarounds?
Tuomo Soini
2019-May-22 08:18 UTC
How to get original recipient from Postfix when using LMTP?
On Tue, 21 May 2019 18:24:46 +0000 MRob via dovecot <dovecot at dovecot.org> wrote:> Many people prefer to use LMTP for delivery from postfix for better > efficiency but X-Original-to header support still missing after many > years. One affect of this is need to set > sieve_vacation_dont_check_recipient = yes which violate Sieve > standard and cause auto-replyies sent to messages that should not > happen. Or abandon LMTP. or abandon postfix?? > > So while feature request is stalled are there any realistic > workarounds?add to smtp_recipient_restrictions, before permitting email but after all checks: check_recipient_access pcre:/etc/postfix/recipient_access.pcre # cat /etc/postfix/recipient_access.pcre /(.+)/ prepend X-Original-To: $1 -- Tuomo Soini <tis at foobar.fi> Foobar Linux services +358 40 5240030 Foobar Oy <https://foobar.fi/>
On 2019-05-22 08:18, Tuomo Soini via dovecot wrote:> On Tue, 21 May 2019 18:24:46 +0000 > MRob via dovecot <dovecot at dovecot.org> wrote: > >> Many people prefer to use LMTP for delivery from postfix for better >> efficiency but X-Original-to header support still missing after many >> years. One affect of this is need to set >> sieve_vacation_dont_check_recipient = yes which violate Sieve >> standard and cause auto-replyies sent to messages that should not >> happen. Or abandon LMTP. or abandon postfix?? >> >> So while feature request is stalled are there any realistic >> workarounds? > > add to smtp_recipient_restrictions, before permitting email but after > all checks: > > check_recipient_access pcre:/etc/postfix/recipient_access.pcre > > # cat /etc/postfix/recipient_access.pcre > /(.+)/ prepend X-Original-To: $1Warning, do not do this unless you don't mind recipients of multi-recipient emails to see a list of everyone who got a copy of the email message, including BCC recipients. This isn't a good solution if you want to respect user privacy.
Apparently Analagous Threads
- How to get original recipient from Postfix when using LMTP?
- How to get original recipient from Postfix when using LMTP?
- Catch-all with LMTP and Postfix
- dovecot transport with postfix and recipient restrictions.
- Sieve vacation not getting enough headers "no known (envelope) recipient address found in message headers"