There have been a couple of requests for the cidr file I'm using to block spam in postfix. This only works if you know you'll likley never recieve mail from outside the US (or you don't want to). Further, it only works for fairly low traffic mail servers. If you really want to use it for a high traffic site, change the 451s to REJECTs. If you have a lot of users or recieve mail from outside the US often you won't want to use this approach. Use the personal_cidr file to keep a list of your personal blocks, or to OK clients.
This is the real file I use, so it will be updated over time. You could wget it in a cron every 2-3 months for example. If you have any updates to it - please send them along. Also, this list may be out of date. Any corrections/removals would be very welcome.
http://ryansimpkins.com/regional_cidr
In main.cf, add this (I also do these RBLs which really help):
smtpd_client_restrictions =
cidr:/etc/postfix/personal_cidr,
cidr:/etc/postfix/regional_cidr,
reject_rbl_client zen.spamhaus.org,
reject_rbl_client bl.spamcop.net,
reject_rbl_client dnsbl.njabl.org
Don't forget to run postmap & restart.
postmap /etc/postfix/personal_cidr postmap /etc/postfix/regional_cidr /etc/init.d/postfix restart
Incidently, I had to unblock a server in Euorpe last night. Since I sent 451's back instead of REJECTs, adding the MX to my whitelist was all that I had to do. The mail came through a few minutes later.