We have modifed the Return-Path: and Reply-To: sections of our email by doing the following:
/etc/postfix/main.cf
smtp_generic_maps = hash:/etc/postfix/generic
/etc/postfix/generic
bounce@mainserver.com bounce@relay.com
admin@mainserver.com admin@relay.com
before adding this we get
Return-Path: <bounce@mainserver.com>
Authentication-Results: mta1087.mail.ir2.yahoo.com
header.i=@relay.com header.s=mail dkim=pass (ok);
spfDomain=mainserver.com spfResult=none;
dmarc=pass(p=none sp=quarantine dis=none) header.from=relay.com
Received-SPF: none (domain of mainserver.com does not designate permitted sender hosts)
after:
Return-Path: <bounce@relay.com>
Authentication-Results: mta1129.mail.ir2.yahoo.com
header.i=@relay.com header.s=mail dkim=permerror (bad sig);
spfDomain=relay.com spfResult=pass;
dmarc=pass(p=none sp=quarantine dis=none) header.from=relay.com
Received-SPF: pass (domain of relay.com designates xx.xx.xx.xx as permitted sender)
This change is causing our DKIM to get permerror (bad sig) is there a fix for this or another approach?
"With the smtp_generic_maps parameter you can specify generic(5) lookup tables that replace local mail addresses by valid Internet addresses when mail leaves the machine via SMTP. "
Source:
https://de.postfix.org/httpmirror/ADDRESS_REWRITING_README.html#generic
– Allan Wallace Jun 22 '19 at 20:35http://www.postfix.org/canonical.5.html
(instead of Generic)
– Allan Wallace Jun 22 '19 at 20:50smtp_generic_maps = hash:/path/filewithcanonical_maps = hash:/path/fileand restarting postfix fixed the problem, many thanks!!! – lucaferrario Aug 18 '20 at 15:07/etc/postfix/main.cfconfiguration will becanonical_maps =hash:/etc/postfix/canonical. – Hasanuzzaman Sattar Apr 23 '22 at 06:48