I am setting up Postfix on a Linux server because I want to send mail independently. I need to change sender address because the default sender is from user@server.local.
This config changes sender addresses from both local originated, and relayed SMTP mail traffic:
# nano /etc/postfix/main.cf:Rewrite envelope address from email originating from the server
sender_canonical_classes = envelope_sender, header_sender
sender_canonical_maps = regexp:/etc/postfix/sender_canonical_maps
smtp_header_checks = regexp:/etc/postfix/header_check
# nano /etc/postfix/sender_canonical_maps:Rewrite from address in SMTP relayed e-mail
/.+/ newsender@example.com
# nano /etc/postfix/header_check:
/From:.*/ REPLACE From: newsender@example.com
0 comments:
Post a Comment