Postfix multiple alias with response (from alias mail)

dovecotpostfix

I have a postfix – dovecot mail server installed over a Ubuntu 14.04 VPS.

Is the following situation possible? I have tried using alias, but when i try to reply the mail, this one is delivered from bob1@domain.com (and this mail should be hidden!)

Mail sent to info@domain.com, this mail delivers to bob1@domain.com and to bob2@domain.com. When bob1 or bob2 replys the mail, it should be sent from info@domain.com. Is it possible?

Thanks!

Best Answer

You probably want to set sender_canonical_maps for outgoing mails. This way you get both header and envolope addresses rewritten.

But for incoming mails recipient_canonical_maps doesn't work since you can only map to one E-Mail address. Anyways it's probably cleaner to have recipient_bcc_maps (delivers to info, bob1 and bob2) or virtual_alias_maps (delivers to bob1 and bob2 instead of info).

So you should use something like this:

/etc/postfix/main.cf:

virtual_alias_maps = hash:/etc/postfix/virtual_alias_maps
sender_canonical_maps = hash:/etc/postfix/sender_canonical

/etc/postfix/sender_canonical:

bob1@domain.com info@domain.com
bob2@domain.com info@domain.com

/etc/postfix/virtual_alias_maps:

info@domain.com bob1@domain.com, bob2@domain.com

You maybe have to add domain.com in the virtual_alias_maps table if it is not already defined as one of Postfix destionation domains somewhere in your configuration.

Please have a look at Postfix' address rewriting README for more details.

PS: Your described behaviour sounds like an Issue Tracking System, so you may want to have a look at one of those systems: https://en.wikipedia.org/wiki/Comparison_of_issue-tracking_systems

Related Topic