Postfix adds the sender to the blacklist
1. Edit configuration file
# vi / etc/postfix/main.cf add the following line smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/sender_access
two。 Create a blacklist list
# vi / etc/postfix/sender_accesstest@example.com REJECT # reject the sender exmaple.com REJECT # reject the domain name 1.2.3.4 REJECT # reject IP
3. Generate blacklist database
# postmap / etc/postfix/sender_access# ll / etc/postfix/sender_access.db
4. Restart the postfix service
# / etc/init.d/postfix reload
5. If you remove the sender from the blacklist, you need to delete the sender
# postmap / etc/postfix/sender_access# / etc/init.d/postfix reload
Once the result has been tested, the test content will not be posted.