
SRS overwrite return-path header and this can cause DMARC problems. To disable overwriting for local accounts are two ways:
- Static
- Dynamic
Static way is add all of local domains to SRS_EXCLUDE_DOMAINS configuration parameter of postsrsd.
Dynamic way is to create a new file: /etc/postfix/no-srs.cf:
user = USER
password = PASSWORD
dbname = DATABASE
hosts = 127.0.0.1
query = SELECT email FROM mail_user WHERE email='%s'
where %s is a email address
and add in /etc/postfix/main.cf:
sender_canonical_maps = mysql:/etc/postfix/no-srs.cf, tcp:localhost:10001
sender_canonical_classes = envelope_sender
recipient_canonical_maps = mysql:/etc/postfix/no-srs.cf, tcp:localhost:10002
recipient_canonical_classes= envelope_recipient,header_recipient
then reload postfix and that’s all.