<?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>Icheb's blog &#187; smtp</title>
	<atom:link href="http://www.icheb.info/tag/smtp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.icheb.info</link>
	<description>Welcome to my unupdated, not really interesting blog</description>
	<lastBuildDate>Sun, 31 Jan 2010 20:59:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Exim &amp; backscatter &#8211; what to do?</title>
		<link>http://www.icheb.info/2009/07/exim-backscatter-what-to-do/</link>
		<comments>http://www.icheb.info/2009/07/exim-backscatter-what-to-do/#comments</comments>
		<pubDate>Sun, 05 Jul 2009 15:47:31 +0000</pubDate>
		<dc:creator>Icheb</dc:creator>
				<category><![CDATA[Nerd stories]]></category>
		<category><![CDATA[backscatter]]></category>
		<category><![CDATA[clamav]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[mta]]></category>
		<category><![CDATA[rbl]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[spamassassin]]></category>

		<guid isPermaLink="false">http://www.icheb.info/?p=86</guid>
		<description><![CDATA[Argh&#8230; Why does this always happen when you don&#8217;t have the time for it. Receiving backscatter bombs. One of the big issues, I still have to deal with is what to do about the endless stream of backscatter bounce messages. First of all&#8230; What is backscatter, you might ask. What is backscatter? Backscatter is the [...]]]></description>
			<content:encoded><![CDATA[<p>Argh&#8230;</p>
<p>Why does this always happen when you don&#8217;t have the time for it. Receiving backscatter bombs.</p>
<p>One of the big issues, I still have to deal with is what to do about the endless stream of backscatter bounce messages.</p>
<p>First of all&#8230; What is backscatter, you might ask.</p>
<p><span id="more-86"></span><strong>What is backscatter?</strong></p>
<p>Backscatter is the effect you get when you have a mail server, that starts to receive bounces of mails you didn&#8217;t send. Like the following example:</p>
<p>A spammer decides to send a spam to all kinds of addresses all over the world, with your e-mail address in the From. And those messages are bounced by the receiver.</p>
<p>Normally, what would happen is, the sender would get a nice MTA generated e-mail stating the mail could not be delivered. This is exactly the problem. Instead of the sender (the spammer), the mail gets send to <strong>you</strong>, due to the fact your domain was abused&#8230; This is hard to filter, as the MTA&#8217;s that are sending the messages to you, are actually following all the relevant RFC&#8217;s. So it&#8217;s hard to figure out what to accept and what to deny. But it gets even worse, when you have a fallback mailserver <img src='http://www.icheb.info/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
<p>You can&#8217;t just refuse everything that doesn&#8217;t feel or sound like something you should accept. For example, in a new setup I&#8217;m working on, I required all mail that had a from which matched a local domain, to be authenticated, works nice in theory (although this doesn&#8217;t solve this issue), however&#8230; If you have someone that uses the SMTP server of his or hers provider and cc the messages to you, your local MTA will just refuse the mail. Which is bad&#8230;</p>
<p>To make it even more complicated, some people use a secundairy or fallback mailserver, you can just use greylisting, stuff like Sanesecurity addons for ClamAV, but you will still get more than enough <em>crap mail </em>to handle.</p>
<p>One thing that will help against backscatter in Exim, is a nice and ugly (RFC breaking) solution. You add something like this to your config:</p>
<p>BOUNCE_ID = &lt;some kine of unique ID&gt;<br />
BOUNCE_SECRET = &lt;some kind of md5 or sha1 key&gt;</p>
<p>And later on, in your config, you add something like this to your ACL:</p>
<p>deny  senders = :<br />
! condition = ${if match \<br />
{$message_body $message_body_end} \<br />
{[xX]-bounce-key:\\s*BOUNCE_ID;${rxquote:${lc:$recipients}};(\\d+);(\\w+)} \<br />
{${if eq {$2} \<br />
{${length_8:${md5:BOUNCE_ID;${lc:$recipients};$1;BOUNCE_SECRET}}} \<br />
{${if &lt;{${sg{${eval:$tod_epoch-$1}}{-}{}}}{864000}{1}}}}}}<br />
message = Bounce does not contain a valid X-bounce-key signature so not accepting message</p>
<p>And to your remote smtp router, you add:</p>
<p>headers_add = ${if eq{$return_path}{}{}{X-bounce-key: BOUNCE_ID;${lc:$return_path};$tod_epoch;${length_8:${md5:BOUNCE_ID;${lc:$return_path};$tod_epoch;BOUNCE_SECRET}};}}</p>
<p>This will probably work really well, but it will also block certain stuff you do want to receive.</p>
<p>Like reading confirmations from Outlook.</p>
<p>To avoid that, you can add something to your ACL&#8217;s like:</p>
<p>accept<br />
regex = [dD]isposition.*disposition-notification.*<br />
accept<br />
regex = [dD]isposition.*MDN-sent.*displayed.*</p>
<p>But this can also be used by spammers <img src='http://www.icheb.info/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
<p>So far I have to admit, I disabled the &#8216;solution&#8217; again, and just abuse SpamAssassin as much as possible, together with ClamAV / Sanesecurity and RBL checking.</p>
<p>If you don&#8217;t accept the message, it&#8217;s not your problem <img src='http://www.icheb.info/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
<p>And still, you will receive loads and loads of spam, from the secundairy mailserver. Greylisting, SA on SMTP time, ClamAV on SMTP time is just not enough&#8230;</p>
<p>However, if you combine it with stuff like http://wiki.apache.org/spamassassin/WrongMXPlugin, it might be enough.</p>
<p>If anyone has better idea&#8217;s (that don&#8217;t involve shutting down the MTA entirely, I&#8217;m all ears!)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.icheb.info/2009/07/exim-backscatter-what-to-do/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
