all groups > iis smtp nntp > july 2005 >
You're in the

iis smtp nntp

group:

smtp mail server on win 2003 sends mail to qmail servers is rejected


smtp mail server on win 2003 sends mail to qmail servers is rejected pcampbell4144 NO[at]SPAM hotmail.com
7/10/2005 12:25:15 PM
iis smtp nntp:
hi i have an smtp mail server as part of iis and it sends email ok
except to qmail servers , which are refused with this error
http://cr.yp.to/docs/smtplf.html - does any one know how i fix this ?

is this a problem with the email content being generated by our own
bespoke application - or is there an issue with the smtp server .

any help appreciated pcampbell4144@hotmail.com
Re: smtp mail server on win 2003 sends mail to qmail servers is rejected Dylan Beattie
7/14/2005 12:00:00 AM
Hi,

[quoted text, click to view]

I've just spent a few days isolating and fixing what looks like an instance
of this problem - we upgraded our server from Win2000 to Win2003, and
suddenly we couldn't send e-mail to a handful of domains any more.

My results and solution are here:

http://www.dylanbeattie.net/docs/iis6_bare_linefeed.html

The problem can basically be summarised thus:

Internet e-mail standards forbid the presence of bare linefeed characters in
e-mail messages. See http://cr.yp.to/docs/smtplf.html for more information.
There are several places in our website code where we send e-mail messages
which include bare linefeed characters (ie. we've 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, making it basically impossible to send a
malformed message through the SMTP server. IIS 6, which is part of Windows
Server 2003, doesn't 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 unexpected response causes bizarre behaviour
in the IIS SMTP server.

In a perfect world, IIS would record the actual response from the remote
server in the Windows event log - so, if it had tried (and failed) to send
to a qmail server, your event description would be "Message delivery to the
host 1.2.3.4 failed while delivering to the remote domain dylanbeattie.net
for the following reason: 451: See http://pobox.com/~djb/docs/smtplf.html."
Then IIS would move the malformed message into the Badmail folder, and move
onto the next one.

What it actually does is to stop delivering any mail to the domain that
caused the problem. Even if subsequent mails don't contain the offending
bare linefeed characters, IIS will not attempt to deliver them. Furthermore,
restarting the SMTP service doesn't 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.

If any MVPs are listening, I'd be interested to know whether the change in
IIS' behaviour between v5 and v6 is by design, and whether migration issues
like this are documented somewhere?

Kind regards,

Dylan

--
---------------------------------------------------------------------
Dylan Beattie | <my first name> at zepler.org | www.dylanbeattie.net
---------------------------------------------------------------------


AddThis Social Bookmark Button