To avoid backscatter emails, on Postfix I set:
smtpd_reject_unlisted_sender = true
But this prevents the Odoo from sending some particular emails, since it uses some custom aliases as sender:
How can I whitelist the Odoo server/app?
Instead of making this a global directive, place
smtpd_sender_restrictions (it must appear after
permit_sasl_authenticated, if you used that).
Now you can add the sender’s IP address to
mynetworks = to whitelist it and cause it to bypass this check.
An example from my live mail server:
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unlisted_sender, reject_unauthenticated_sender_login_mismatch, permit
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.