Bypassing Relayhost in Postfix Based on Sender

In main.cf:

1
2
relayhost = your.relay.here
smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/sender_access

In /etc/postfix/sender_access:

1
dontrelaymebro@domain.com FILTER smtp:

Then postmap /etc/postfix/sender_access and you’re good to go.

Comments