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=...") |
m |
||
Line 1: | Line 1: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 8.x]] > [[CentOS 8.x email servers]] > [[CentOS 8.x postfix]] > [[CentOS 8.x postfix rewrite sender address on outgoing email]] | |||
==Replace only email address and not the sender name== | ==Replace only email address and not the sender name== | ||
Line 36: | Line 35: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 8.x]] > [[CentOS 8.x email servers]] > [[CentOS 8.x postfix]] > [[CentOS 8.x postfix rewrite sender address on outgoing email]] |
Latest revision as of 03:19, 30 March 2022
Home > CentOS > CentOS 8.x > CentOS 8.x email servers > CentOS 8.x postfix > 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:
Home > CentOS > CentOS 8.x > CentOS 8.x email servers > CentOS 8.x postfix > CentOS 8.x postfix rewrite sender address on outgoing email