Postfix relay certain domain internal and external.

root# cat /etc/postfix/
relay_domains = $mydestination, hash:/etc/postfix/relaydomains
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_client_restrictions = permit_mynetworks, check_client_access hash:/etc/postfix/acc
ess, reject
smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination

root# cat /etc/postfix/relaydomains OK OK

root# cat /etc/postfix/access OK

root# cat /etc/postfix/mynetworks

Remember to run: postmap /etc/postfix/relaydomains and postmap /etc/postfix/access is allowed to send e-mails just to and via the relay server. and are allowed to send e-mails to everywhere via the relay server.

Leave a Reply

Your email address will not be published. Required fields are marked *