Glen Eustace:
> One of our customers has complained that our mail system is broken. We have
> been using postfix for many years and have come across the behaviour the
> complaint is about a number of times but haven?t spent a lot of time or
> energy trying to solve it. I would like to try to do so now.
>
> The issue is that when a mailing list sends messages, the final recipient is
> in none of the internal headers i.e. to: cc: etc. If the message goes into a
> mailbag i.e. shared mailbox, when the messages are retrieved by the customers
> Exchange server they are not having much luck with determining who to deliver
> the message to.
This is why Postfix by default adds an X-Original-To: header with
the original recipient up on mailbox delivery. This is with
"enable_original_recipient = yes".
That of course does not work if some other program does the mailbox
delivery instead of Postfix.
You can prepend a recipient header with an smtpd access rule:
/etc/postfix/main.cf:
smtpd_recipient_restrictions =
check recipient_access prce:/etc/postfix/prepend-rcpt.pcre
...other rules...
/etc/postfix/prepend-rcpt.pcre:
/(.+)/ prepend X-Rcpt-To: $1
Note that this is a privacy leak; all recipients can see the addresses
of all other recipients.
Wietse