If you need to block some senders, you can do the following
Open /etc/postfix/sender_access file:
cd /etc/postfix nano sender_access
Append sender email id as follows:
[email protected] REJECT
Save and close the file. Use postmap command to create a database:
postmap hash:sender_access
Now open main.cf and add code as follows:
smtpd_recipient_restrictions = check_sender_access hash:/etc/postfix/sender_access
Save and close the file. Restart / reload postfix MTA:
/etc/init.d/postfix restart
Every time after add new email to blacklist need to execute:
postmap hash:sender_access /etc/init.d/postfix restart