Change to the Postfix configuration directory. Usually this is in /etc/postfix.
cd /etc/postfix
Open the sender_access file or create it if it doesn't exist.
vi sender_access
Add the email address you want rejected on a new line in the file followed by REJECT.
email@address.com REJECT
Save the file.
Create the server_access database with the postmap command
postmap hash:sender_access
Edit the main.cf file and add the following
smtpd_recipient_restrictions = check_sender_access hash:/etc/postfix/sender_access
Restart Postfix
service postfix restart
Check your logs to make sure everything is good.
Comments
Leave a comment Trackback