Changing X-Original-To: header in postfix

2

I am using a virtual file with my postfix to redirect all mails coming to my domain to a user

My virtual entry looks like this

@domain.com root

Now the X-Original-TO header shows root@domain.com. I want to set in such a way that the X-Original-To field to show the mail id by which the mail is originally sent.

For eg: if a user tries to mail user8@domain.com. The user8 does nt exists in the server. According to my virtual file, it will be forwarded to root@domain.com. and the X-Original-To header will be showing as "root@domain.com". I want it to show as user8@domain.com

Unnikrishnan

Posted 2014-02-01T05:24:57.433

Reputation: 1 193

Answers

0

I have my server setup similarly, however, I use luser_relay to redirect unknown local addresses.

luser_relay = root@example.com

I do not use alias_maps. With this I get the wanted X-Original-To: header.

http://www.postfix.org/postconf.5.html#luser_relay

Mark Lopez

Posted 2014-02-01T05:24:57.433

Reputation: 925