Event Id | 4006 |
Source | smtpsvc |
Description | Message delivery to the host xxx.xxx.xxx.xxx failed while delivering to the remote domain dylanbeattie.net for the following reason: The connection was dropped by the remote host. |
Event Information | This information from some newsgroups may help you: ------------------------------------------------------------------------------ Cause : Internet e-mail standards forbid the presence of bare linefeed characters in e-mail messages. There are several places in our website code where we send e-mail messages which include bare linefeed characters (ie. weve used \n in the message text, instead of \r\n). The SMTP service in IIS 5, which is included with Windows 2000, silently rewrites these linefeed characters. IIS 6, which is part of Windows Server 2003, doesnt rewrite them - it will happily send a bare linefeed character as part of an outgoing e-mail message. Some external e-mail systems will quite happily accept these badly-formed messages, but other systems, including the excellent qmail server, will refuse to accept these messages. Unfortunately, this causes bizarre behaviour in the IIS SMTP server.What it actually does is to stop delivering any mail to the domain that caused the problem. Even if subsequent mails dont contain the offending bare linefeed characters, IIS will not attempt to deliver them. Furthermore, restarting the SMTP service doesnt help, because when IIS tries to process the messages that are already in the queue, the first thing it finds is the message containing the bare linefeed, which causes it to flip out again, etc.The only way to restore normal mail to the affected domain is to stop the SMTP service, locate the offending message, manually remove it from the Queue folder, and then start the SMTP service again. Resolution : Make sure your website code isnt trying to send e-mail messages containing bare linefeeds. Replacing the bare \ns with \r\n (carriage-return, line-feed) appears to have solved the problem. Tracking down this particular bug required a whole bunch of tricks and tinkering, so for anyone whos interested, heres how I went about finding and fixing the problem. First, the usual DNS and connectivity checks. Find a computer which accepts internet e-mail for dylanbeattie.net. We can check this using the nslookup tool, to find something called an MX record for a particular domain. Make sure that the mail exchanger is awake, and accepting connections. Analyse the actual SMTP traffic for one of our offending messages. |
Reference Links |
Catch threats immediately
We work side-by-side with you to rapidly detect cyberthreats
and thwart attacks before they cause damage.