Add the following line in
/etc/postfix/main.cf. All outgoing emails will have this address in the FROM field, but the name of the sender will not be modified. Replace <FQDN> with your fully qualified domain name.
sender_canonical_maps = static:no-reply@<FQDN>
To modify the name as well, you need to create a file in
/etc/postfix/header_checkswhich contains this line:
/^From:[[:space:]]+(.*)/ REPLACE From: "Your Name" <email@example.com>
Then run the following commands:
cd /etc/postfix postmap header_checks postconf -e 'smtp_header_checks = regexp:/etc/postfix/header_checks' /etc/init.d/service postfix reload
Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.