PEP: DNS Blocklists
These databases are stored in a DNS "zone" and they are queried via DNS lookups (PEP does all that for you, so don't worry about it if you don't know what that means).
Generally, though, a site gets listed because it is the source of spam or facilitates spam in some way (often due to being an open relay).
Spammers like open relays because they can offload all the resource usage (CPU, disk space, bandwidth, etc.) of sending their junk to someone else's server. This is theft of service.
The main thing to keep in mind is that every blocklist can help to eliminate spam, but every blocklist will also eventually cause legitimate mail to be blocked. Usually the more effective it is at blocking spam, the more likely it is to block legitimate mail as well. Use them at your own risk.
It is up to you to visit the web site for each blocklist and determine for yourself whether it suits your needs.
Here's a list of just some of the DNS blocklist zones you can use (in no particular order and presented without comment). Some services have more than one zone that you can use:
- relays.ordb.org
- bl.spamcop.net
- spammers.v6net.org
- relays.visi.com
- blacklist.spambag.org
- block.blars.org
- blackholes.wirehub.net
- dynablock.wirehub.net
- blackholes.five-ten-sg.com
- dnsbl.njabl.org
- xbl.selwerd.cx
- ipwhois.rfc-ignorant.org
- whois.rfc-ignorant.org
- dsn.rfc-ignorant.org
- postmaster.rfc-ignorant.org
- abuse.rfc-ignorant.org
PEP has two special "header" values named "DNSBL" and "DNSBLTXT" which contain the result code and the TXT record (if any) from the last lookup. By default these are both set to empty values. They are only filled in when you tell PEP to perform a DNSBL lookup for a zone, which you do with the dnsbl command. If the lookup fails they will be emptied again.
The dnsbl command must always be given a zone name. You can also give it an IP address or domain name to look up, but the default is to use the IP address of the machine that passed the message to our mail server, which is usually what you want.
In this example we first tell PEP to perform a DNSBL lookup in the relays.osirusoft.com zone. After that we can test the return code for specific values. Then we perform another DNSBL lookup on the relays.ordb.org zone and fail anything that is listed there:
dnsbl relays.osirosoft.com fail if dnsbl is "127.0.0.2" with "You are a verified open relay" fail if dnsbl is "127.0.0.3" with "Direct mail from dialups not allowed" fail if dnsbl is "127.0.0.4" with "You are a confirmed spam source" dnsbl relays.ordb.org fail if dnsbl is not "" with "Spam from {ip} not welcome {dnsbltxt}" |
Notice how we only need to perform one dnsbl lookup for a zone, then we can perform multiple tests on the results.
This example checks to see if the sender's domain is violating the RFCs that require a server to have a postmaster mailbox:
dnsbl postmaster.rfc-ignorant.org {senderdomain} fail if dnsbl is not "" with "{dnsbltxt}" |