[Update 23/Oct/09: Hotmail has fixed this issue now]

Our logs were showing lots of repeated send failures from Hotmail.
A closer investigation of the issue has revealed that Hotmail has suddenly decided that the mail RFC’s are too good for them to follow.

RFC’s are the standards which define how things work. When people don’t follow the standards, this makes things break.

In this case, it meant that all mail from Hotmail was being rejected, this is a Hotmail is broken issue!
Getting Hotmail to change their broken setup is likely to be non-productive – there are already a few pages of complaints about it on their site, complete with the boilerplate totally useless replies from drones who don’t understand the issue, despite it being helpfully spelled out for them.

See here –
http://windowslivehelp.com/community/p/127432/474962.aspx
http://windowslivehelp.com/community/t/123986.aspx

Unfortunately, while bouncing invalid email content is correct from a technical perspective, our clients need to be able to receive mail from Hotmail.
As an interim solution, I’ve patched qmail to allow for bare linefeeds.

This was fairly easy – a small patch to qmail-smtpd.c, a recompile, then restart qmail-smtpd.

To patch, look for switch(state) in qmail-smtpd.c, and remove the straynewline(); calls, so that barelinefeeds are accepted.
Code to change below:

case 0:
if (ch == '\n') { state = 1; break; }
if (ch == '\r') { state = 4; continue; }
break;
case 1: /* \r\n */
if (ch == '.') { state = 2; continue; }
if (ch == '\r') { state = 4; continue; }
if (ch != '\n') state = 0;
break;
case 2: /* \r\n + . */
if (ch == '\n') return;
if (ch == '\r') { state = 3; continue; }
state = 0;
break;

2 Comments to “Hotmail server issues – bare lf issue”

  • Ragnar Moller says:

    Nice,

    But for someone who has a QMAIL installed but didn’t do it himself, the recompile is not s evident.

    We identified a make file, and that we shoul launch “make it”, but then, is there also e reinstallation to do ?

  • make, then make install copies the binaries for you automatically, and as a bonus doesn’t change your current build configuration, assuming you built from source. You still need to stop qmail from running while making the build, or it will fail writing to the binaries currently running on your system.

    Ultimately I veered away from solving it this way, and have gone instead with a wrapper around qmail run script, as I’ve solved the compatibility issues I was having doing that *and* doing STARTTLS.

    More info on that if you need, its a more elegant solution, and it also gave me the opportunity to do more logging of (problem) connections that way. John Simpson has some good ideas on that also – see http://qmail.jms1.net for his take on that. I’ve learned a lot from his code examples, although I don’t necessarily come to the same conclusions he does on some things. (Certain things I do differently, than he does for my own reasons.
    )

Post comment

Archives

Categories

Most Popular Posts

Tags

Recent Comments

  • HenryX: If you have any problems about motocycle , I can answer you. I am a local Shanghaier with a 5 years’...
  • Johnny E: Hi Lawrence.. i have a 1999 Bmw E46 320i, i had to change the engine because it was broken, and now i...
  • Lawrence Sheed: Zoneminder is a video monitoring capture system. I have an IP Camera pointed at the entrance, and...
  • Shaun Wallace: That is pretty cool, and cheap too! I may order one thanks to your recommendation. What is zone...
  • Hector: My country doesn’t require a license for MOPEDS & no highway sticker. Liability and the cost of...

Recent Trackbacks

PHOTOSTREAM

Side Art