Regional SPAM Blocking in Postfix

Ryan Simpkins plug at
Thu Jul 9 13:01:15 MDT 2009

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.

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.

In, add this:
smtpd_client_restrictions = cidr:/etc/postfix/cidr

Don't forget to run postmap /etc/postfix/cidr.


More information about the PLUG mailing list