0

This question is based on this one, which I feel belongs better here and has so far not been answered anyway.

Similarly to the other poster, I'm using a virtual_alias_map file with my postfix to redirect all mails coming to my domain to a user.

My virtual entry looks like this:

user8@domain.com root@newdomain.com

Now the X-Original-To header apparently for some people, like the original poster, shows root@newdomain.com. For me, it doesn't show at all, despite the postfix manual clearly stating that header should be set (but perhaps under some conditions, e.g. I use a canonical map canonical_maps=regexp:/etc/postfix/canonical with canonical_classes=envelope_sender to set a different envelope from as well, it might be omitted?). In any case, I want X-Original-To to be set in such a way that the field shows the mail id by which the mail is originally sent:

Example: A user tries to mail user8@domain.com. The account user8 doesn't exists in the server. According to my virtual file, it will be forwarded to root@newdomain.com. After this, the X-Original-To header will apparently either be showing as root@newdomain.com, or in my case nothing. I want it to show as user8@domain.com.

Additional complexity: My virtual map has multiple entries with a different left-hand, e.g. multiple different source accounts like user8 or user7, but the same right-hand for all of these. If multiple of these left-hands are CC'ed at once, the X-Original-To on the final forwarded mail should only be set once with a comma separated list, rather than the header being set multiple times with conflicting values.

Is there any somewhat easy approach to getting such an X-Original-To header to work?

E. K.
  • 63

0 Answers0