How to change the From header for messages sent by Postfix ​
WARNING
Applies to VoipNow 3.X.X and higher!
If for any reason, you need to replace the email sender with another name/email address, you must follow the recommendations below.
Step-by-step guide ​
- 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 / with your fully qualified domain name.
bash
sender_canonical_maps = static:no-reply@<FQDN>- To modify the name as well, you need to create a file inÂ
/etc/postfix/header_checks which contains this line:
bash
/^From:[[:space:]]+(.*)/ REPLACE From: "Your Name" <email@company.com>- Then run the following commands:
bash
cd /etc/postfix
postmap header_checks
postconf -e 'smtp_header_checks = regexp:/etc/postfix/header_checks'
service postfix reload