IanG on Tap

Ian Griffiths in Weblog Form (RSS 2.0)

Blog Navigation

August (2014)

(1 item)

July (2014)

(5 items)

April (2014)

(1 item)

March (2014)

(1 item)

January (2014)

(2 items)

November (2013)

(2 items)

July (2013)

(4 items)

April (2013)

(1 item)

February (2013)

(6 items)

September (2011)

(2 items)

November (2010)

(4 items)

September (2010)

(1 item)

August (2010)

(4 items)

July (2010)

(2 items)

September (2009)

(1 item)

June (2009)

(1 item)

April (2009)

(1 item)

November (2008)

(1 item)

October (2008)

(1 item)

September (2008)

(1 item)

July (2008)

(1 item)

June (2008)

(1 item)

May (2008)

(2 items)

April (2008)

(2 items)

March (2008)

(5 items)

January (2008)

(3 items)

December (2007)

(1 item)

November (2007)

(1 item)

October (2007)

(1 item)

September (2007)

(3 items)

August (2007)

(1 item)

July (2007)

(1 item)

June (2007)

(2 items)

May (2007)

(8 items)

April (2007)

(2 items)

March (2007)

(7 items)

February (2007)

(2 items)

January (2007)

(2 items)

November (2006)

(1 item)

October (2006)

(2 items)

September (2006)

(1 item)

June (2006)

(2 items)

May (2006)

(4 items)

April (2006)

(1 item)

March (2006)

(5 items)

January (2006)

(1 item)

December (2005)

(3 items)

November (2005)

(2 items)

October (2005)

(2 items)

September (2005)

(8 items)

August (2005)

(7 items)

June (2005)

(3 items)

May (2005)

(7 items)

April (2005)

(6 items)

March (2005)

(1 item)

February (2005)

(2 items)

January (2005)

(5 items)

December (2004)

(5 items)

November (2004)

(7 items)

October (2004)

(3 items)

September (2004)

(7 items)

August (2004)

(16 items)

July (2004)

(10 items)

June (2004)

(27 items)

May (2004)

(15 items)

April (2004)

(15 items)

March (2004)

(13 items)

February (2004)

(16 items)

January (2004)

(15 items)

Blog Home

RSS 2.0

Writing

Programming C# 5.0

Programming WPF

Other Sites

Interact Software

Exchange, Earthlink, and SMTP 550 Errors on SBS 2003

Wednesday 2 June, 2004, 11:25 PM

I had a problem with Exchange on my Small Business Server 2003 box: when sending to anyone with an earthlink.net email address, I would often get delivery failures. The cause appeared to be that Earthlink's SMTP server was rejecting the inbound emails with a 550 error. Googling showed this to be one of those problems which loads of people have, and for which a common set of solutions get proposed whenever someone asks for help, none of which actually work...

To be fair, I did actually find the answer in Google. It was just heavily outnumbered by wrong answers, so I thought I'd try to improve the odds of finding a solution for others suffering the same problem by posting this. Frankly, it's not actually all that interesting, so if you're one of my regular blog readers, I'd recommend skipping this one unless you're actually experiencing the same problem. (Or are uncommonly interested in email delivery issues.)

The problems are typically intermittent, but fairly frequent. As well as getting NDRs, you will (if you turn on logging in Exchange; it appears to be off for outbound SMTP by default for some reason) see something similar to the following:

This is an SMTP protocol error log for virtual server ID 1, connection #8. The remote host "207.217.121.212", responded to the SMTP command "rcpt" with "550-EarthLink does not recognize your computer (212.135.178.89) as connecting from an EarthLink connection. If this is in error, please contact technical support. 550 relaying to <someone@earthlink.net> prohibited by administrator ". The full command sent was "RCPT TO:<someone@earthlink.net> ". This will probably cause the connection to fail.

(If that's not the error you're seeing, this is not the web page for you.)

Earthlink are aware that this happens. In fact it seems like they have a standard email they send out to people who are seeing this problem. It more or less accurately characterises the problem, although it gets one significant detail wrong, in that it pins the blame on the wrong component. That's reasonable - this problem isn't Earthlink's fault, it's always a problem at the sender's end. However, it's a shame that they blame Exchange when technically, it's not actually Exchange that's the problem - they're not helping anyone fix their systems by pointing the finger of blame in the wrong place...

What's happening is this: Exchange is connecting to the wrong machine in an attempt to deliver mail, and that's why you get errors. But that opens more questions than it answers.

The wrong machine that it connects to is earthlink.net. If you're not familiar with how SMTP mail delivery is normall performed, you might be surprised that this turns out to be the wrong machine, but it is. The right way to deliver email is to look up the name of the machines that handle mail for the target domain in the DNS. This information is found in the MX records. Here are Earthlink's MX records:

earthlink.net   MX preference = 10, mail exchanger = mx6.earthlink.net
earthlink.net   MX preference = 5, mail exchanger = mx1.earthlink.net
earthlink.net   MX preference = 5, mail exchanger = mx2.earthlink.net
earthlink.net   MX preference = 5, mail exchanger = mx4.earthlink.net
earthlink.net   MX preference = 5, mail exchanger = mx5.earthlink.net
earthlink.net   MX preference = 5, mail exchanger = mx7.earthlink.net
earthlink.net   MX preference = 5, mail exchanger = mx8.earthlink.net
earthlink.net   MX preference = 5, mail exchanger = mx9.earthlink.net
earthlink.net   MX preference = 5, mail exchanger = mxa.earthlink.net
earthlink.net   MX preference = 5, mail exchanger = mxb.earthlink.net
earthlink.net   MX preference = 5, mail exchanger = mxc.earthlink.net
earthlink.net   MX preference = 5, mail exchanger = mxd.earthlink.net
earthlink.net   MX preference = 5, mail exchanger = mxe.earthlink.net
earthlink.net   MX preference = 10, mail exchanger = mx3.earthlink.net

They have 14 mail servers. (Presumably for load balancing and availability. My domain has two, purely for availability.) Notice that earthlink.net does not appear in this list. The raises an obvious question and a not so obvious question. The obvious one is: why is Exchange connecting to a machine that's not listed in the MX records? But first I'd like to tackle the less obvious question because it explains why this problem afflicts Earthlink addresses, but not most other ones.

The less obvious question is: how come we get far enough to get a 550 SMTP error? Usually, if you try to deliver email to a machine that's not the mail server, you won't get that far. Try opening an SMTP connection to, say, microsoft.com, and you'll find the attempt just times out, for the rather simple reason that there is no SMTP server running on microsoft.com. This is pretty common, so for most domains, this spurious connection attempt to somedomain.com is benign because it fails to connect at all. But what makes Earthlink unusual is that they are running an SMTP server on earthlink.net - it is actually possible to connect to the SMTP port on that address.

But that doesn't explain the failure. For example, I also run an SMTP server on the machine named for my domain, and this won't cause the problems you get with Earthlink. mail.interact-sw.co.uk resolves to the same IP as interact-sw.co.uk, and mail.interact-sw.co.uk is one of the addresses in my MX records. So as you'd expect in this particular case, delivering mail to interact-sw.co.uk does actually work even though you're not supposed to try that.

In general, you'd think everything would be OK even with Exchange making these erroneous connections because one of two things would happen:

  1. The somedomain.com machine isn't running an SMTP server, so Exchange will be unable to connect, causing it to try one of the other machines (which will be one of the ones with an MX record).
  2. The somedomain.com machine is running an SMTP server, so the mail will be delivered.

However, it turns out the Earthlink don't match either of these. Rather surprisingly, although Earthlink run an SMTP server on earthlink.net, it doesn't accept incoming email for the earthlink.net domain! That server is designed to handle outbound mail only. Because of that, it fails attempts to send email to any address whatsoever, whether it's an earthlink.net address or not, unless the connection originated from within Earthlink's own networks, in which case it will forward it. The idea is that Earthlink customers point their email software at this server, and use it to send their own outbound mail. This service is not intended for use by anyone other than Earthlink customers. (I'm not quite sure why Earthlink leave the port open to outsiders if it's only for internal use. But I'm sure they have their reasons. Perhaps it's possible to use this server from outside if you authenticate. They are certainly not doing anything prohibited by the relevant email-related specifications.)

The Problem

So, back to the other question: why is Exchange trying to deliver these emails to earthlink.net when that's not one of the addresses listed in the MX records? (And there's the less burning issue of why it does this to other domains too. It happens to get away with it with those, so it's not as troublesome as the Earthlink problem, but it would still be better to make it stop.)

Despite how it may seem, and contrary to what the usual response from Earthlink's support appears to indicate (going by what people on Usenet have said; I've not heard from Earthlink support myself) this is not in fact a problem with Exchange. It's a DNS problem. It seems that the way that SBS 2003 configures itself by default, the Exchange server will use the DNS server on the SBS server to do MX lookups, and that seems not to work all the time.

Exchange tries to deliver email to the wrong host because it's getting bogus results from the DNS lookups it performs to retrieve MX records. So the fault is not with Exchange - it's doing the right thing according to the results of its MX lookups. It's just that it's being given the wrong results by the DNS server for these lookups. Microsoft seem to think that this a firewall issue:

http://support.microsoft.com/default.aspx?scid=kb;en-us;828263

but I don't think it's that simple. This problem only occurs when using the Windows DNS server - by reconfiguring Exchange to talk directly to my ISP's DNS servers, going through the exact same firewall that the Windows DNS server was going through when forwarding requests, this problem was prevented. (And several other people seem to have found that this fixes the problem on their systems too.) Moreover, I saw the same issue occur with one domain which only had 2 MX records, so it seems unlikely that this is just an issue with the size. I seemed to be getting bogus entries in my DNS server's cache. (Flushing the cache would typically get rid of any email problems for a while, but they always came back.)

The Solution

As already mentioned, the solution seems to be to configure your Exchange server to use your ISP's DNS server. You do this by opening the properties for your Virtual SMTP Server, selecting the Delivery tab, clicking on the Advanced... button, and then clicking the Configure... button. Add the IP addresses of your ISP's DNS servers here. This causes Exchange to use those rather than using the local DNS.

That was enough to fix the problem for me. If it doesn't work for you, sorry about that... Try all the other stuff suggested in Google Groups.

Copyright © 2002-2013, Interact Software Ltd. Content by Ian Griffiths. Please direct all Web site inquiries to webmaster@interact-sw.co.uk