How to block postfix connection to a specific ip address
There are a handful of sites that continuously send SPAM to my server and seem to avoid getting listed on the blacklist servers. I'm trying to set up POSTFIX to refuse connections from these sever's IP addresses. Here is how I set up smtpd_client_restrictions in main.cf:
smtpd_client_restrictions =
check_client_access hash:/Library/Server/Mail/Config/postfix/client_checks
permit_mynetworks
permit_sasl_authenticated
reject_rbl_client bl.spamcop.net
reject_rbl_client zen.spamhaus.org
permit
The content of /Library/Server/Mail/Config/postfix/client_checks:
94.242.161.0/24 REJECT Your IP range is spammer
141.255.161.0/24 REJECT Your IP range is spammer
192.95.54.0/24 REJECT Your IP range is spammer
198.50.229.0/24 REJECT Your IP range is spammer
198.50.171.0/24 REJECT Your IP range is spammer
For some reason POSTFIX isn't blocking SMTP connections from these IP addresses.
Is there some other command that I need to specify for smtpd_client_restrictions to get processed?
Is the syntax of my client check incorrect?
Mac mini, OS X Server, 10.8.4 Mountain Lion Server