Re: Postfix: Can I insert a custom header to incoming mail?
Paul Hartman <[email protected]> Fri, 15 Jul 2011 12:18:02 -0500
| Newsgroups | gmane.linux.gentoo.server |
|---|---|
| Message-ID | <CAEH5T2NEqZjjoRQ-pHOD+4N29s62=J_jnOAgpR6rvUAOhSphmw@mail.gmail.com> |
On Thu, Jul 7, 2011 at 7:41 PM, kashani <[email protected]> wrote: > If you aren't using Sieve, I would try is using virtual_transport = virtual > instead of virtual_transport = dovecot Thanks! That seems to have worked. Mail is still being delivered, and now the X-Original-To: header is in-place. Really great, now I can start migrating my mail domains that depend on that feature. I also found a semi-work-around posted by Wietse Venema on the postfix list: [quote] You can fake it in the SMTP server with /etc/postfix/main.cf: smtpd_recipient_restrictions = check_recipient_access pcre:/etc/postfix/recipient_access.pcre /etc/postfix/recipient_access.pcre /(.+)/ prepend X-Original-To: $1 [end quote] This method worked with virtual_transport = dovecot, however it had problems dealing with multi-recipient mail. (for example if [email protected] and [email protected] were both recipients on the same message, both users' mail would have the first username as the X-Original-To header). That situation is rare enough in my case that it would have been acceptable if the virtual_transport = virtual wasn't usable. Thanks again, Paul