Reducing Spam

These are the recommendations that I have found elsewhere on the web

Adding the RBL

There appear to be three copies of on a Westhost system. These are located at /usr/share/sendmail/, /etc/ and /etc/mail/  However the first two are symbolic links – the one in /etc/mail is the one we are interested in. The file /etc/mail/ is a complete set of m4 macros needed to generate a fresh /etc/mail/ – backup your existing file before making any changes! (Use the command cp -p to /etc/mail/ /etc/mail/sendmail.bak to preserve the modification date and ownerships).  Then open in your favourite text editor and add this to the end of the file.

FEATURE(`dnsbl',`',`"554 Rejected " $&{client_addr} " found in"')dnl
FEATURE(`dnsbl',`',`"554 Rejected " $&{client_addr} " found in"')dnl
FEATURE(`dnsbl',`',`"554 Rejected " $&{client_addr} " found in"')dnl

You will also need to enable Delay_Check by removing the first dnl from

dnl FEATURE(delay_checks)dnl

so that it becomes


Anything to the right of dnl is a comment in (BEWARE! Macros will be expanded so don’t include them). 

I have given three examples, however there are other lists which you could use.
Strictly speaking, only one list is required.  In fact more then one will cause a performance hit but will catch more spam so it is up to you as to what your needs are. You could even include more – MAPS maintains 3 different lists plus a fourth that includes all three but they now charge for access if your site is in any way commercial.

After adding those lines to your file all you need to do is execute the following command from the /etc/mail dir.

m4 > ./

After running the m4 command restart your VPS and you are done. If you have set up your mail server to use, you can test to see if the SBL blocking is working by sending an email (any email) to (You must send the email from the mail server which you wish to test). The Crynwr system robot will answer you to tell you if your server is correctly blocking SBL-listed IPs or not. If you have done everything right then you will get the reply

Testing your SBL block. See for more info.
Please note that this test will not tell you if your server is open for
relaying. Instead, it tests to see if your server blocks email from IP
addresses listed in various blocking lists; in this case, the SBL list.

Here’s how the conversation looked from
Note that some sites don’t apply the SBL block to postmaster, so
I use your envelope sender as the To: address.

I connected to and here’s the conversation I had:

220 ESMTP Sendmail 8.11.6/8.11.6; Tue, 17 Oct 2006 05:23:36 -0600
250 Hello [], pleased to meet you
mail from:<>
250 2.1.0 <>… Sender ok
rcpt to:
554 5.7.1 Rejected found in
Terminating conversation

You can always change the LogLevel in your from 0 to 9 to help troubleshoot. This creates the log file /var/log/maillog. Remember to reset the LogLevel to 0 (zero) once you have fixed the problem