Masquerading or replacing outgoing SMTP email address with Postfix
August 1, 2012
· Admin
Ubuntu 11.10
Unix
Ubuntu 11.04
Ubuntu
postfix
Postfix can replace an outgoing email address by another one. To do so, you must perform these steps: Add in /etc/postfix/main.cf the following line
smtp_generic_maps = hash:/etc/postfix/generic_maps
Add in hash:/etc/postfix/generic_maps a line for each email address you want to replaced. The line shall contain the email address to replace followed by the new email address separated by a space. For example:
user@machine-name emailaddress@domain.tld
Generate or update the map by issuing the following command
postmap /etc/postfix/generic_maps
Restart postfix by issuing the following command
service postfix restart
Copyright 2012–2026, Claude "Tryphon" Théroux