Colourful Norwich skyline illustration

Michael Sage

IT, Digital & Culture

Postfix From Rewrite

Quick article about re-writing the from address from postfix Add the following to  

sender_canonical_classes = envelope_sender, header_sender
sender_canonical_maps =  regexp:/etc/postfix/sender_canonical_maps
smtp_header_checks = regexp:/etc/postfix/header_check
Then create the files and their contents




From:.*/ REPLACE From:
Reload Postfix and test

mail -s “Test Subject” < /dev/null

Check the mail logs to see if it’s successful. This trick is really useful if you use a 3rd party to relay email and they require some form of domain or address authentication.