since last weeks I have a problem with my postfix configuration.
Some of my postboxes are defined as catchall, but thats make it really hard to separate the mails. What I need is something like X-Sender
in the header to determine the sender. I have activated the X-Original-To in postfix, but in my case it seems very useless, postfix just placed the mailbox name there like email@example.com
After googeling a bit I added a regular expression file with
/(.+)/ PREPEND X-Sender: $1
and added the line in Postfix right after
smtpd_recipient_restrictions = check_recipient_access pcre:/etc/postfix/append_header.regexp, (...)
in the main.cf file. That works very well for one address, but if I send it to multiple recipents I have tons of multiple entries in the mail head.
So that is not really what I'm searching for, it breaks the Bcc and I think it's not good to have a lot of entries with the same description.
In the last step I moved the entry to the smtpd_data_restrictions
in main.cf. It work very well. But when I address more than one recipient, the X-Sender will not be added to the header...
Have anyone some experience with that? I get a lot of mails from other users/provieder which have also that kind of header added. Is that probably not possible to add when I use postfix? And now i'm totally confused with the X-Delivered, X-Envelope.., X-Original stuff...
Hope for help