Difference between revisions of "CentOS 8.x postfix rewrite sender address on outgoing email"
From Notes_Wiki
(Created page with "<yambe:breadcrumb self="Rewrite sender address on outgoing email">CentOS 8.x postfix|postfix</yambe:breadcrumb> =CentOS 8.x postfix rewrite sender address on outgoing email=...") |
(No difference)
|
Revision as of 13:01, 28 September 2021
<yambe:breadcrumb self="Rewrite sender address on outgoing email">CentOS 8.x postfix|postfix</yambe:breadcrumb>
CentOS 8.x postfix rewrite sender address on outgoing email
Replace only email address and not the sender name
If you want to replace only outgoing email address without changing the display name use following in /etc/postfix/main.cf:
sender_canonical_maps = static:no-reply@<FQDN>
Replace both outgoing address and sender name
To replace outgoing (from) address on outgoing email with a desired display name use:
- Create file =/etc/postfix/header_checks= with following content:
- /^From:[[:space:]]+(.*)/ REPLACE From: "Your Name" <email@company.com>
- Configure postfix to use above configuration using:
- cd /etc/postfix
- postmap header_checks
- postconf -e 'smtp_header_checks = regexp:/etc/postfix/header_checks'
- service postfix reload
See related CentOS 8.x postfix replace addresses on outgoing email
Refer:
<yambe:breadcrumb self="Rewrite sender address on outgoing email">CentOS 8.x postfix|postfix</yambe:breadcrumb>