{"id":272,"date":"2009-10-09T12:33:23","date_gmt":"2009-10-09T04:33:23","guid":{"rendered":"http:\/\/www.computersolutions.cn\/blog\/?p=272"},"modified":"2009-10-25T20:23:27","modified_gmt":"2009-10-25T12:23:27","slug":"hotmail-server-issues-bare-lf-issue","status":"publish","type":"post","link":"https:\/\/www.computersolutions.cn\/blog\/2009\/10\/hotmail-server-issues-bare-lf-issue\/","title":{"rendered":"Hotmail server issues &#8211; bare lf issue"},"content":{"rendered":"<p><strong>[Update 23\/Oct\/09:  Hotmail has fixed this issue now]<\/strong><\/p>\n<p>Our logs were showing lots of repeated send failures from Hotmail.<br \/>\nA closer investigation of the issue has revealed that Hotmail has suddenly decided that the mail RFC&#8217;s are too good for them to follow.<\/p>\n<p>RFC&#8217;s are the standards which define how things work.  When people don&#8217;t follow the standards, this makes things break.<\/p>\n<p>In this case, it meant that all mail from Hotmail was being rejected, this is a Hotmail is broken issue!<br \/>\nGetting Hotmail to change their broken setup is likely to be non-productive &#8211; there are already a few pages of complaints about it on their site, complete with the boilerplate totally useless replies from drones who don&#8217;t understand the issue, despite it being helpfully spelled out for them.<\/p>\n<p>See here &#8211;<br \/>\n<a href=\"http:\/\/windowslivehelp.com\/community\/p\/127432\/474962.aspx\">http:\/\/windowslivehelp.com\/community\/p\/127432\/474962.aspx<\/a><br \/>\n<a href=\"http:\/\/windowslivehelp.com\/community\/t\/123986.aspx\">http:\/\/windowslivehelp.com\/community\/t\/123986.aspx<\/a><\/p>\n<p>Unfortunately, while bouncing invalid email content is correct from a technical perspective, our clients need to be able to receive mail from Hotmail.<br \/>\nAs an interim solution, I&#8217;ve patched qmail to allow for bare linefeeds.<\/p>\n<p>This was fairly easy &#8211; a small patch to qmail-smtpd.c, a recompile, then restart qmail-smtpd.<\/p>\n<p>To patch, look for switch(state) in qmail-smtpd.c, and remove the straynewline(); calls, so that barelinefeeds are accepted.<br \/>\nCode to change below:<\/p>\n<p><code>case 0:<br \/>\n        if (ch == '\\n') { state = 1; break; }<br \/>\n         if (ch == '\\r') { state = 4; continue; }<br \/>\n         break;<br \/>\n       case 1: \/* \\r\\n *\/<br \/>\n         if (ch == '.') { state = 2; continue; }<br \/>\n         if (ch == '\\r') { state = 4; continue; }<br \/>\n        if (ch != '\\n') state = 0;<br \/>\n         break;<br \/>\n       case 2: \/* \\r\\n + . *\/<br \/>\n        if (ch == '\\n') return;<br \/>\n         if (ch == '\\r') { state = 3; continue; }<br \/>\n         state = 0;<br \/>\n         break;<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>[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&#8217;s are too good for them to follow. RFC&#8217;s are the standards which define how things work. When people don&#8217;t [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[25],"tags":[138,136,135,137],"class_list":["post-272","post","type-post","status-publish","format-standard","hentry","category-technical-mumbo-jumbo","tag-bad","tag-bare-line-feed","tag-hotmail","tag-microsoft-sucks"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.computersolutions.cn\/blog\/wp-json\/wp\/v2\/posts\/272","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.computersolutions.cn\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.computersolutions.cn\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.computersolutions.cn\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.computersolutions.cn\/blog\/wp-json\/wp\/v2\/comments?post=272"}],"version-history":[{"count":5,"href":"https:\/\/www.computersolutions.cn\/blog\/wp-json\/wp\/v2\/posts\/272\/revisions"}],"predecessor-version":[{"id":279,"href":"https:\/\/www.computersolutions.cn\/blog\/wp-json\/wp\/v2\/posts\/272\/revisions\/279"}],"wp:attachment":[{"href":"https:\/\/www.computersolutions.cn\/blog\/wp-json\/wp\/v2\/media?parent=272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.computersolutions.cn\/blog\/wp-json\/wp\/v2\/categories?post=272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.computersolutions.cn\/blog\/wp-json\/wp\/v2\/tags?post=272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}