<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tony Bhimani's Blog &#187; MTA</title>
	<atom:link href="http://www.tonybhimani.com/tag/mta/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tonybhimani.com</link>
	<description>Where I Share my Linux and Programming Experiences</description>
	<lastBuildDate>Sun, 01 Jun 2008 02:48:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Anti-Spam Techniques: DNSBL in Sendmail</title>
		<link>http://www.tonybhimani.com/2008/03/30/anti-spam-techniques-dnsbl-in-sendmail/</link>
		<comments>http://www.tonybhimani.com/2008/03/30/anti-spam-techniques-dnsbl-in-sendmail/#comments</comments>
		<pubDate>Mon, 31 Mar 2008 03:27:04 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Sendmail]]></category>
		<category><![CDATA[DNSBL]]></category>
		<category><![CDATA[MTA]]></category>

		<guid isPermaLink="false">http://www.tonybhimani.com/2008/03/30/anti-spam-techniques-dnsbl-in-sendmail/</guid>
		<description><![CDATA[This topic is nothing new as there are many tutorials out there covering it, but I figured I&#8217;d write a post for the hell of it. If you use Sendmail as your MTA and get vast amounts of spam you can try using DNSBL to cut the amount you receive by rejecting them at the [...]]]></description>
			<content:encoded><![CDATA[<p>This topic is nothing new as there are many tutorials out there covering it, but I figured I&#8217;d write a post for the hell of it. If you use Sendmail as your MTA and get vast amounts of spam you can try using <a href="http://en.wikipedia.org/wiki/DNSBL" title="Learn more about DNSBL on Wikipedia" target="_blank">DNSBL</a> to cut the amount you receive by rejecting them at the point of connection. This helps save on your bandwidth consumption by not accepting the full message and then sorting it later as spam or ham. I&#8217;ve had DNSBL implemented for quite some time and also use it in conjunction with MailScanner and Spamassassin to block and filter the thousands of junk messages my server is bombarded with daily. The amount of spam has been reduced significantly.</p>
<p>I don&#8217;t happen to know what versions of Sendmail started to include DNSBL as a feature, but if you have anything from version 8.12 or higher then you shouldn&#8217;t have any problems enabling DNSBL in the sendmail.mc file. For those of you using an older version of Sendmail, the <a href="http://dnsbl-milter.sourceforge.net/" title="dnsbl-milter - Sendmail DNSBL &amp; DNSWL milter" target="_blank">dnsbl-milter</a> project may be of interest to you.</p>
<p>To start using DNSBL, open your sendmail.mc file in a text editor.</p>
<pre class="code">[root@linux ~]# cd /etc/mail
[root@linux mail]# nano sendmail.mc</pre>
<p>You&#8217;ll need to acquire your list of DNSBL servers you want to use, but here is an example of a few that I use. You can add these files to the end of your sendmail.mc file.</p>
<pre class="code">FEATURE(`dnsbl', `bl.spamcop.net', `"Rejected - see http://spamcop.net/bl.shtml?"$&amp;{client_addr}')dnl
FEATURE(`dnsbl', `zen.spamhaus.org', `Rejected - see http://www.spamhaus.org/')dnl
FEATURE(`dnsbl', `dnsbl.sorbs.net', `Rejected - see http://www.sorbs.net/')dnl</pre>
<p>I use <a href="http://www.spamcop.net/" title="spamcop.net" target="_blank">SpamCop</a>, <a href="http://www.spamhaus.org/" title="The Spamhaus Project" target="_blank">Spamhaus</a>, and <a href="http://www.de.sorbs.net/" title="SORBS (Spam and Open-Relay Blocking System)" target="_blank">SORBS</a> to block most of the junk mail hitting my server. After you&#8217;ve added your changes, save your sendmail.mc file and rebuild it.</p>
<pre class="code">[root@linux mail]# make -C /etc/mail
make: Entering directory `/etc/mail'
make: Leaving directory `/etc/mail'
[root@linux mail]#</pre>
<p>Sendmail should automatically read in the changes therefore you won&#8217;t need to restart it. To verify that Sendmail DNSBL is working, check your maillog and look for lines like these.</p>
<pre class="code">[root@linux mail]# tail -n 100 /var/log/maillog
...
Mar 30 22:59:04 linux sendmail[7702]: ruleset=check_relay, arg1=72-249-20-190.adsl.terra.cl, arg2=127.0.0.11, relay=72-249-20-190.adsl.terra.cl [190.20.249.72], reject=553 5.3.0 Rejected - see http://www.spamhaus.org/
Mar 30 23:02:20 linux sendmail[7781]: ruleset=check_relay, arg1=[58.87.60.104], arg2=127.0.0.2, relay=nat1.hyundai.net [58.87.60.104] (may be forged), reject=553 5.3.0 Rejected - see http://spamcop.net/bl.shtml?58.87.60.104
Mar 30 23:04:33 linux sendmail[7808]: ruleset=check_relay, arg1=[200.78.212.70], arg2=127.0.0.2, relay=na-200-78-212-70.na.avantel.net.mx [200.78.212.70] (may be forged), reject=553 5.3.0 Rejected - see http://spamcop.net/bl.shtml?200.78.212.70
Mar 30 23:04:40 linux sendmail[7809]: ruleset=check_relay, arg1=[61.108.132.122], arg2=127.0.0.2, relay=[61.108.132.122], reject=553 5.3.0 Rejected - see http://spamcop.net/bl.shtml?61.108.132.122</pre>
<p>For a list of DNSBL servers you can use this site as a reference: <a href="http://spamlinks.net/filter-dnsbl-lists.htm" title="Spam Links - dns &amp; rhs blackhole lists" target="_blank">http://spamlinks.net/filter-dnsbl-lists.htm</a></p>
<p>Other Sources for DNSBL in Sendmail:<br />
<a href="http://www.sdsc.edu/~jeff/spam/Sendmail.html" title="Sendmail Configuration" target="_blank">Sendmail Configuration (8.11.6 specific)</a><br />
<a href="http://www.technoids.org/dnsbl.html" title="DNSBL: Configuring Sendmail for DNS-Based Blacklisting" target="_blank">DNSBL: Configuring Sendmail for DNS-Based Blacklisting</a></p>
<p>DNSBL for Other MTA&#8217;s:<br />
<a href="http://www.exim.org/howto/rbl.html" title="HOWTO - Using DNS Block Lists (DNSBLs)" target="_blank">HOWTO &#8211; Using DNS Block Lists (DNSBLs) (Exim)</a><br />
<a href="http://howtoforge.com/block_spam_at_mta_level_postfix" title="How To Block Spam Before It Enters The Server (Postfix)" target="_blank">How To Block Spam Before It Enters The Server (Postfix)</a><br />
<a href="http://www.greens.org/about/software/dnsbl.shtml" title="Protecting Qmail from known spam sources" target="_blank">Protecting Qmail from known spam sources</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tonybhimani.com/2008/03/30/anti-spam-techniques-dnsbl-in-sendmail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
