Postfix to allow Mail Relay from a Trusted IP

Make sure smtpd_recipient_restrictions has permit_mynetworks, something like this:

smtpd_recipient_restrictions = permit_mynetworks,<more>

This is the default, but if you have -o smtpd_recipient_restrictions=something on an smtpd line in master.cf then it will override main.cf setting.

A sample configuration that worked for me is as below-

smtp inet n - n - - smtpd
-o smtpd_sasl_auth_enable=yes
-o smtpd_reject_unlisted_sender=yes
-o smtpd_recipient_restrictions=permit_sasl_authenticated,permit_mynetworks,reject
# -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
-o broken_sasl_auth_clients=yes
Share

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.