<?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>Word to the Wise &#187; dns</title>
	<atom:link href="http://blog.wordtothewise.com/tag/dns/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.wordtothewise.com</link>
	<description>Email, Delivery, Spam and more</description>
	<lastBuildDate>Tue, 07 Feb 2012 23:24:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>The view from a blacklist operator</title>
		<link>http://blog.wordtothewise.com/2010/06/blacklist-operators-view/</link>
		<comments>http://blog.wordtothewise.com/2010/06/blacklist-operators-view/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 22:49:59 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Industry]]></category>
		<category><![CDATA[Blocking]]></category>
		<category><![CDATA[cbl]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://blog.wordtothewise.com/?p=1587</guid>
		<description><![CDATA[We run top-level DNS servers for several blacklists including the CBL, the blacklist of infected machines that the SpamHaus XBL is based on. We don&#8217;t run the CBL blacklist itself (so we aren&#8217;t the right people to contact about a CBL listing) we just run some of the DNS servers &#8211; but that means that [...]]]></description>
			<content:encoded><![CDATA[<p>We run top-level DNS servers for several blacklists including the CBL, the blacklist of infected machines that the SpamHaus XBL is based on. We don&#8217;t run the CBL blacklist itself (so we aren&#8217;t the right people to contact about a CBL listing) we just run some of the DNS servers &#8211; but that means that we do get to see how many different ways people mess up their spam filter configurations.</p>
<p>This is what a valid CBL query looks like:</p>
<ul>
<li>&#8220;14.23.177.10.cbl.abuseat.org&#8221;</li>
</ul>
<p>It&#8217;s just the IP address being queried (10.177.23.14) with the numbers reversed, with &#8220;.cbl.abuseat.org&#8221; added on the end. Not rocket science.</p>
<p>Here&#8217;s a tiny sample of some of the invalid queries:</p>
<ul>
<li>&#8220;70.46.6.10.abuseat.org&#8221;</li>
<li>&#8220;202.204.219.10cbl.abuseat.org&#8221;</li>
<li>&#8220;252.94.193.10.ns1-cbl.abuseat.org&#8221;</li>
<li>&#8220;255.190.244.10 cbl.abuseat.org&#8221;</li>
<li>&#8220;166.193.222.10#cbl.abuseat.org&#8221;</li>
<li>&#8220;214.6.224.10.*@cbl.abuseat.org&#8221;</li>
<li>&#8220;212.9.185.10.http://cbl.abuseat.org&#8221;</li>
<li>&#8220;76.207.80.10.bl.abuseat.org&#8221;</li>
<li>&#8220;185.124.73.10.cbb.abuseat.org&#8221;</li>
<li>&#8220;201.54.179.10.cbl-xbl.abuseat.org&#8221;</li>
<li>&#8220;54.191.254.10.opm.abuseat.org&#8221;</li>
<li>&#8220;181.4.133.10.sbl-xbl.abuseat.org&#8221;</li>
<li>&#8220;176.33.165.10.cbl.abuseat.orgcbl.abuseat.org&#8221;</li>
<li>&#8220;101.126.133.10.cbl.abuseat.org:Mail from %IP% refused by blackhole site cbl.abuseat.org&#8221;</li>
</ul>
<p>Those are just 15 of about 1800 different misconfigurations I have on file, just for queries to the CBL. I&#8217;ve seen similar things at other domains I host, and I&#8217;ve heard of just the same sort of thing from other people who own domains that are similar in some way to a domain used by a blacklist. It&#8217;s not unusual.</p>
<p>What happens when someone misconfigures a blacklist lookup in this way? Because of the way DNS based blacklists work the response to any of these invalid queries will be &#8220;no, that IP address isn&#8217;t listed&#8221;. So all these people are attempting to use the CBL to filter out spam and haven&#8217;t noticed that it&#8217;s never actually stopped any email. And all the time they&#8217;re doing this, they&#8217;re hammering my DNS servers (and many other peoples) with millions of pointless queries every day.</p>
<p>What can the DNS server operators do about that? Because of the way DNS works, blocking the broken queries will actually increase the amount of traffic they have to deal with by several times. Contacting all the people making the queries and pointing out the problem would be a huge task, and even when I have tracked down contact information and notified people by email I&#8217;ve never had a response and the problem has never been fixed.</p>
<p>So the only remaining option is to make the misconfiguration more obvious to the user &#8211; by responding to the invalid queries with &#8220;yes, that IP address is listed&#8221; and hoping that causing them to reject all the mail sent to their users will encourage them to fix their configuration. I check my <a title="DNS Server Stats" href="http://tupid.org/dns-server-stats.html" target="_blank">nameserver statistics</a> every so often and add &#8220;poison&#8221; entries for the more obvious misconfigurations I find. I did that for a bunch of misconfigurations manually yesterday, which will probably cause a lot of domains to reject a bunch of email they didn&#8217;t want to this morning.</p>
<p>There are fairly simple ways to make sure you&#8217;re querying a real blacklist &#8211; pretty much all of the legitimate blacklists include the IP address &#8220;127.0.0.2&#8243; as a test entry. You can use that to check that a blacklist is live manually &#8211; if the blacklist domain is sbl.spamhaus.org then a <a title="xnnd dns lookup" href="http://xnnd.com/dns.cgi?t=a&amp;d=2.0.0.127.sbl.spamhaus.org" target="_blank">dns lookup for &#8220;2.0.0.127.sbl.spamhaus.org&#8221;</a> should return an answer (typically 127.0.0.2) while a <a title="xnnd dns lookup" href="http://xnnd.com/dns.cgi?t=a&amp;d=1.0.0.127.sbl.spamhaus.org" target="_blank">dns lookup for &#8220;1.0.0.127.sbl.spamhaus.org&#8221;</a> should return &#8220;not found&#8221; / &#8220;NXDOMAIN&#8221;. If either of those tests fails, the blacklist is broken in some way, and you shouldn&#8217;t use it.</p>
<p>The choice of 127.0.0.2 for the test entry wasn&#8217;t arbitrary: 127.0.0.2 is a &#8220;local&#8221; address that&#8217;s always available on machine, though it&#8217;s usually never used for anything. But you can use it &#8211; if you open a commandline on your mailserver you can run an SMTP transaction by hand (<a title="Basic email delivery using telnet" href="http://blog.wordtothewise.com/2010/06/basic-email-delivery-telnet/" target="_blank">as I discussed yesterday</a>) from 127.0.0.2 using &#8220;telnet -b 127.0.0.2 your.hostname 25&#8243; (on Linux-ish systems, anyway &#8211; some other telnets use &#8220;-s&#8221; instead of &#8220;-b&#8221;). That way you can see whether you&#8217;re really rejecting based on a blacklists, and what error you&#8217;re giving. (It would be nice if every blacklist also had another test entry in 127.* as well as 127.0.0.2, so you could check them individually, but they don&#8217;t. Hint to blacklist operators.).</p>
<p>It&#8217;s very easy for spam filter authors to check those test entries once a day for each of the blacklists they were configured to use, and to disable the ones that failed. If you&#8217;re a postmaster who uses blacklists as part of your spam filter (and you probably should) you should check with the people who provide the filter whether it makes those checks &#8211; and if it doesn&#8217;t, ask them to add them. That will protect you from misconfigurations, blacklists being shut down, blacklists being abandoned and bought up by domain squatters and all sorts of other things that can cause you to lose a lot of mail.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.wordtothewise.com/2010/06/blacklist-operators-view/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Basic email delivery using telnet</title>
		<link>http://blog.wordtothewise.com/2010/06/basic-email-delivery-telnet/</link>
		<comments>http://blog.wordtothewise.com/2010/06/basic-email-delivery-telnet/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 22:22:09 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Delivery Improvement]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[telnet]]></category>

		<guid isPermaLink="false">http://blog.wordtothewise.com/?p=1590</guid>
		<description><![CDATA[Whenever we&#8217;re working with someone to diagnose some obscure delivery issue one of the things we usually have them try is to &#8220;run a transaction by hand&#8221;. Being able to do that is a trick that everyone working with email should be able to do. I was drafting a blog post today and wanted to [...]]]></description>
			<content:encoded><![CDATA[<p>Whenever we&#8217;re working with someone to diagnose some obscure delivery issue one of the things we usually have them try is to &#8220;run a transaction by hand&#8221;. Being able to do that is a trick that everyone working with email should be able to do. I was drafting a blog post today and wanted to refer to running a transaction by hand and I realized that we hadn&#8217;t actually explained it anywhere. So here we are.</p>
<p>When you&#8217;re running a transaction by hand you&#8217;re doing everything your mailserver would do to deliver an email, but you&#8217;re doing it yourself. That means that you get to see all the responses from the mailserver you&#8217;re sending the mail to, and also any delays or errors in much more detail than you can usually get from mailserver delivery logs.</p>
<p>I want to send some email to playingwithtelnet@gmail.com. There are two main steps to doing this &#8211; first I need to find out which mailserver I need to talk to to send mail to gmail, then I need to actually send the mail.</p>
<p>To find the mailserver I have to look up the MX record for gmail.com. From a unix / linux / mac command prompt you can do that like this (the bits you type are in <span style="color: #ff8500;">orange</span>):</p>
<pre><code>platter:~ steve$ <span style="color:#ff8500;">host -t mx gmail.com</span>
gmail.com mail is handled by 5 gmail-smtp-in.l.google.com.
gmail.com mail is handled by 30 alt3.gmail-smtp-in.l.google.com.
gmail.com mail is handled by 10 alt1.gmail-smtp-in.l.google.com.
gmail.com mail is handled by 40 alt4.gmail-smtp-in.l.google.com.
gmail.com mail is handled by 20 alt2.gmail-smtp-in.l.google.com.</code></pre>
<p>Another option is to use a web-based dns lookup site such as Al Iverson&#8217;s <a title="xnnd.com" href="http://xnnd.com/" target="_blank">xnnd.com</a> or our <a title="Email Stuff" href="http://emailstuff.org/" target="_blank">emailstuff.org</a>.</p>
<p>However you do the DNS query you&#8217;ll usually end up with one or more hostnames, each with an associated priority. When you&#8217;re sending email you&#8217;re supposed to try those servers in order of priority, lowest number first, so in this case we&#8217;re going to be talking to the server gmail-smtp.in.l.google.com.</p>
<p>If you&#8217;re trying to replicate a delivery failure that you&#8217;ve seen then you can skip this step and go straight to trying to deliver to the same mailserver you saw fail previously (though double checking that that is a real MX for the domain is a good idea).</p>
<p>You may sometimes not get any answers to the MX record lookup &#8211; if, and only if, that happens then you should send mail directly to the domain part of the email address (&#8220;gmail.com&#8221; in this example).</p>
<p>Now we know which mailserver we&#8217;re going to talk to, so we connect to it with telnet on port 25. You can do this from a unix / linux / mac command line, or from a Windows command prompt (though a Windows firewall may be configured to block you from doing this). Again, the bits you type are in <span style="color: #ff8500;">orange</span>, while the responses from the server are in <span style="color: blue">blue</span></p>
<pre><code>platter:~ steve$ <span style="color: #ff8500;">telnet gmail-smtp-in.l.google.com 25</span>
Trying 74.125.155.27...
Connected to gmail-smtp-in.l.google.com.
Escape character is '^]'.
<span style="color: blue">220 mx.google.com ESMTP y27si6889009wfi.2</span>
<span style="color: #ff8500;">HELO platter.wordtothewise.com</span>
<span style="color: blue">250 mx.google.com at your service</span>
<span style="color: #ff8500;">MAIL FROM:&lt;steve@blighty.com&gt;</span>
<span style="color: blue">250 2.1.0 OK y27si6889009wfi.2</span>
<span style="color: #ff8500;">RCPT TO:&lt;playingwithtelnet@gmail.com&gt;</span>
<span style="color: blue">250 2.1.5 OK y27si6889009wfi.2</span>
<span style="color: #ff8500;">DATA</span>
<span style="color: blue">354  Go ahead y27si6889009wfi.2</span>
<span style="color: #ff8500;">From: &lt;steve@blighty.com&gt;
To: &lt;playingwithtelnet@gmail.com&gt;
Subject: Just a test email

The body of the mail goes here.
.</span>
<span style="color: blue">250 2.0.0 OK 1276638161 y27si6889009wfi.2</span>
<span style="color: #ff8500;">QUIT</span>
<span style="color: blue">221 2.0.0 closing connection y27si6889009wfi.2</span>
Connection closed by foreign host.</code></pre>
<p>A simple mail delivery like this goes through a number of steps. First you telnet to the server on port 25, wait for that to connect, then wait for the server to send you it&#8217;s &#8220;banner&#8221; (&#8220;220 mx.google.com ESMTP &#8230;&#8221;). Then you tell the server who you are with the &#8220;HELO&#8221; command, and wait for a response.</p>
<p>Then you tell it the email address you&#8217;re sending mail from with the &#8220;MAIL FROM&#8221; command &#8211; note that there&#8217;s a colon after MAIL FROM, and then your bare email address surrounded by angle brackets &#8211; and wait for a response. Next you tell it who you want to send mail to, with the RCPT TO command &#8211; again followed by a colon and the recipients bare email address surrounded by angle brackets.</p>
<p>(You can send mail to multiple recipients by repeating the RCPT TO command here).</p>
<p>Then you&#8217;re ready to send the email itself, so you send the &#8220;DATA&#8221; command to tell the server you&#8217;re about to do that, and wait for it to respond with something like &#8220;354 Go ahead&#8221;. Then you enter the email you want to send, consisting of the headers, a blank line, then the body of the message. To tell the server you&#8217;re done, send a period (&#8220;.&#8221;) on it&#8217;s own as the final line. You&#8217;ll typically want to have at least To:, From: and Subject: headers and a short message body for even a simple test, but if you&#8217;re considering content-related filtering then you&#8217;ll want to paste in a copy of a real email.</p>
<p>Once the server has accepted the email you send the command &#8220;QUIT&#8221; to tell it you&#8217;re done, and it will close the connection.</p>
<p>You can see that each response from the server starts with a three digit number. If that starts with a &#8220;2&#8243; it means that it&#8217;s happy with what you just told it, if it starts with a &#8220;3&#8243; it&#8217;s waiting for you to send the text of the email. If it starts with a &#8220;4&#8243; or a &#8220;5&#8243; it means it&#8217;s unhappy with what you just told it &#8211; maybe you typoed something, maybe it&#8217;s rejecting the mail delivery, maybe you tried commands in the wrong order &#8211; and the text after the number should give you some idea as to why.</p>
<p>If you typo something while you&#8217;re using telnet you can use backspace to delete and correct it while you&#8217;re on the same line. Once you&#8217;ve hit return, though, it&#8217;s already sent to the server and you can&#8217;t change it (and you might need to quite out and start over).</p>
<p>If you get confused at any point and need to quit out of telnet and start over you can use Ctrl-] (hold the ctrl key and press the close square bracket key) to get to a <tt>telnet&gt;</tt> prompt, then type &#8220;quit&#8221;.</p>
<p>There&#8217;s some more sophisticated things you can do, but they&#8217;ll have to wait for another post.</p>
<p>Meanwhile, feel free to use playingwithtelnet@gmail.com to play with running an email transaction by hand.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.wordtothewise.com/2010/06/basic-email-delivery-telnet/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Troubleshooting the simple stuff</title>
		<link>http://blog.wordtothewise.com/2009/11/troubleshooting-the-simple-stuff/</link>
		<comments>http://blog.wordtothewise.com/2009/11/troubleshooting-the-simple-stuff/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 17:21:28 +0000</pubDate>
		<dc:creator>laura</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[barry]]></category>
		<category><![CDATA[delivery problems]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://blog.wordtothewise.com/?p=914</guid>
		<description><![CDATA[I was talking with one of my Barry pals recently and was treated to a rant regarding deliverability experts that can&#8217;t manage simple things. We&#8217;ve been having an ongoing conversation recently about the utterly stupid and annoying questions some senders ask. Last week, I was ranting about a delivery person asking what &#8220;5.7.1. Too many [...]]]></description>
			<content:encoded><![CDATA[<p>I was talking with one of my Barry pals recently and was treated to a rant regarding deliverability experts that can&#8217;t manage simple things. We&#8217;ve been having an ongoing conversation recently about the utterly stupid and annoying questions some senders ask. Last week, I was ranting about a delivery person asking what &#8220;5.7.1. Too many receipts this session&#8221; meant. This morning I got an IM.</p>
<p style="padding-left: 30px;">Barry: I see your &#8220;too many recipients&#8221; and raise you a &#8220;DNS failure.&#8221;</p>
<p style="padding-left: 30px;">Me: You&#8217;re joking.</p>
<p style="padding-left: 30px;">Barry: &#8220;Unknown address error (&#8217;550&#8242;, ['REQUESTED ACTION NOT TAKEN: DNS FAILURE'])</p>
<p style="padding-left: 30px;">Me: That seems pretty self explanatory. I would close the ticket with a &#8220;not a mail issue.&#8221;</p>
<p style="padding-left: 30px;">Barry: It wasn&#8217;t a ticket. It was a direct mail to me by a very well known person on the sender side. You&#8217;d die if you knew who it was. But he didn&#8217;t send me anything useful, not even an IP address.</p>
<p style="padding-left: 30px;">Me: You&#8217;re kidding? Please tell me you&#8217;re kidding. Please.</p>
<p>This is yet another example of people bothering Barry with questions that should be answerable by anyone who holds themselves up as a delivery expert. Really.</p>
<p>Barry is not your free consultant. Barry has a job and it does not involve troubleshooting problems on your end. Asking questions about stupid stuff like &#8220;too many recipients this session&#8221; or &#8220;DNS failure&#8221; is why most Barry&#8217;s don&#8217;t hand out their info to senders. They don&#8217;t want to be bothered with questions just because the sender is too stupid or lazy to do their own troubleshooting.</p>
<p>There are two things that come to mind immediately when I see this error message and two things that I would check before even considering contacting someone.</p>
<ol>
<li>This is an internal DNS failure and the MX lookup on the sender&#8217;s side failed. The sender should do a manual DNS lookup and confirm they can get a MX record (or A) record for the recipient domain.</li>
<li>This is a DNS failure on the receivers side. A little harder to troubleshoot, but some ISPs check the DNS of the sending domain before accepting mail. Make sure that the domain exists in DNS and is answering queries promptly.</li>
</ol>
<p>Once you have checked DNS and everything is OK you can move to the next step. Open up a telnet session to the mail server and do a manual SMTP session. Use the same Mail From: and Rcpt To: that generated the 550 you&#8217;re attempting to troubleshoot. You don&#8217;t need to do the whole session, just through Mail From: and Rcpt To:.</p>
<p>If the Mail From and Rcpt To: addresses are accepted by the receiver mail server, then go back into your MTA and resend the message that originally failed.</p>
<p>It works, you&#8217;re done. If not, go back and think about what else might cause a DNS failure, then test it. Same as you did above. Repeat.</p>
<p>EDIT: While writing the post, I heard back from Barry. The problem was that the sending domain did not exist in DNS. This issue would have been identified at the 2nd DNS check. No mail to Barry needed.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.wordtothewise.com/2009/11/troubleshooting-the-simple-stuff/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

