Monday, January 07, 2013

Use DNSBL with Sendmail

It is imperative that we implement some kind of anti-spam controls in
the mail server that receives internet email traffic. One of the
controls is to check the connecting smtp server's ip address against a
blacklist of known spammers, zombie pc, open relays, ip addresses range
that should not send out email (eg the subscriber ip address ranges of
ISP) etc. What is more, many of these blacklists are free to use.

In this example, we use the blacklists provided by zen.spamhaus.org and
cbl.abuseat.org.

In the /etc/mail/sendmail.mc, we add below two lines:

FEATURE(`dnsbl',`zen.spamhaus.org',`"Rejected due to Spamhaus listing
see http://www.abuse.net/sbl.phtml?IP=" $&{clientaddr} " for more
information"')dnl
FEATURE(`dnsbl',`cbl.abuseat.org',`"Rejected due to cbl listing see
http://www.abuse.net/sbl.phtml?IP=" $&{clientaddr} " for more
information"')dnl

Note the use of backquote here (` vs '). The third parameter provides
the customized message that should be returned to the sending mail
server in case it hits the blacklist. Multiple dnsbl can be used
together to enhance the anti spam strength.

To make the changes effective:

m4 sendmail.mc > sendmail.cf
service sendmail restart


To verify whether the anti spam checking is in use, we can look for
something like 'Rejected due to Spamhaus' in the /var/log/maillog.

5 comments:


  1. Thank you very much for your information.
    Australia ETA/eVisitor Visa
    is quiet easy to apply online from Singapore,
    Malaysia, United Kingdom, United States, Canada, France and including all others ETA Eligible Countries from our website.

    ReplyDelete
  2. the driver will pick you from your place to the destination between it you will be introduced with different picturesque sceneries, You are driven in a 4x4 SUV through a pleasant course close by the Hajar Mountains and into the Hatta Mountains.
    Hatta tour

    ReplyDelete
  3. Very good article and I like it. Thank you for giving me information

    Please Visit to mboplay888.com Slot gambling agent, ball, live casino Indonesia

    Nikmati bonus menarik dari MBOPLAY :

    Welcome Bonus New Member 20% ALL GAMES [ BOLA, POKER, LIVE CASINO, SLOT, IDN LIVE ]

    Promo Cashback Mingguan BOLA UP TO 7.5%
    Promo Cashback Mingguan BOLA UP TO SLOT 1%
    Promo Cashback Mingguan BOLA UP TO LIVE CASINO 1%
    Bonus Next Deposit 5% [ BOLA, LIVE CASINO, SLOT, IDN LIVE ]
    Komisi IDNPOKER 0.5%

    MBOPLAY
    SPBO BOLA
    AGEN SBOBET
    BANDAR JUDI
    AGEN IDN SPORTS
    BURSA TARUHAN BOLA
    JUDI BOLA TERPERCAYA
    BANDAR SPORTS ONLINE TERPERCAYA

    Contact us MBOPLAY.COM :
    Livechat : https://mboplay88b.com/?ref=daftar
    Whatsapp : +6282117858228

    Link Alternatif MBOPLAY :

    https://mboplay88b.com/?ref=daftar
    https://mboplay88c.com/?ref=daftar
    https://mboplay888.com/?ref=daftar

    ReplyDelete