{"id":702,"date":"2010-06-15T18:52:23","date_gmt":"2010-06-15T16:52:23","guid":{"rendered":"http:\/\/blog.benny-baumann.de\/?p=702"},"modified":"2010-06-15T19:12:43","modified_gmt":"2010-06-15T17:12:43","slug":"outlook-und-die-authentifizierung","status":"publish","type":"post","link":"https:\/\/blog.benny-baumann.de\/?p=702","title":{"rendered":"Outlook und die Authentifizierung"},"content":{"rendered":"<p>Seit kurzem habe ich meinen Mailserver in Bezug auf die Authentifizierung und den Mailversand etwas strenger eingestellt, was soviel hei\u00dft wie &#8222;ein Fehler und die Verbindung wird geschlossen&#8220;. Dieser Ansatz funktioniert auch f\u00fcr die Mail-Einlieferung wunderbar, f\u00fcr den Versand mit Outlook ergibt sich aber ein kleines Problem.<!--more--><\/p>\n<p>Wie so ziemlich jedes Microsoft-Programm versucht Outlook n\u00e4mlich, als erstes die Verbindung mit Hilfe von NTLM zu autorisieren, was aber den einen, einger\u00e4umten Versuch aussch\u00f6pft und somit zum Abbruch der Verbindung f\u00fchrt:<\/p>\n<p><code>Jun 15 17:30:36 box1 postfix\/smtpd[867]: connect from mailclient.example.com[1.3.3.7]<br \/>\nJun 15 17:30:36 box1 postfix\/smtpd[867]: setting up TLS connection from mailclient.example.com[1.3.3.7]<br \/>\nJun 15 17:30:36 box1 postfix\/smtpd[867]: mailclient.example.com[1.3.3.7]: TLS cipher list \"ALL:+RC4:@STRENGTH\"<br \/>\nJun 15 17:30:36 box1 postfix\/smtpd[867]: Anonymous TLS connection established from mailclient.example.com[1.3.3.7]: TLSv1 with cipher AES128-SHA (128\/128 bits)<br \/>\n<strong>Jun 15 17:30:36 box1 postfix\/smtpd[867]: warning: mailclient.example.com[1.3.3.7]: SASL NTLM authentication failed: authentication failure<\/strong><br \/>\nJun 15 17:30:37 box1 postfix\/smtpd[867]: too many errors after AUTH from mailclient.example.com[1.3.3.7]<br \/>\nJun 15 17:30:37 box1 postfix\/smtpd[867]: disconnect from mailclient.example.com[1.3.3.7]<\/code><\/p>\n<p>Nun ist die Sache aber nicht ganz so einfach, wie man denken k\u00f6nnte, da Outlook im Gegensatz zu Thunderbird und zahlreichen anderen (zusammen mit meinem Server eingesetzten) Mailclients keine direkte Kontrolle \u00fcber die verwendeten Login-Methoden l\u00e4sst. Schauen wir daher einmal, was Outlook der Reihe nach probiert:<\/p>\n<p><code>Jun 15 17:34:08 box1 postfix\/smtpd[1189]: connect from mailclient.example.com[1.3.3.7]<br \/>\nJun 15 17:34:09 box1 postfix\/smtpd[1189]: setting up TLS connection from mailclient.example.com[1.3.3.7]<br \/>\nJun 15 17:34:09 box1 postfix\/smtpd[1189]: mailclient.example.com[1.3.3.7]: TLS cipher list \"ALL:+RC4:@STRENGTH\"<br \/>\nJun 15 17:34:09 box1 postfix\/smtpd[1189]: Anonymous TLS connection established from mailclient.example.com[1.3.3.7]: TLSv1 with cipher AES128-SHA (128\/128 bits)<br \/>\n<strong>Jun 15 17:34:09 box1 postfix\/smtpd[1189]: warning: mailclient.example.com[1.3.3.7]: SASL NTLM authentication failed: authentication failure<\/strong><br \/>\n<strong>Jun 15 17:34:09 box1 postfix\/smtpd[1189]: warning: mailclient.example.com[1.3.3.7]: SASL DIGEST-MD5 authentication failed: authentication failure<\/strong><br \/>\n<strong>Jun 15 17:34:10 box1 postfix\/smtpd[1189]: 2E302F8372: client=mailclient.example.com[1.3.3.7], sasl_method=LOGIN, sasl_username=unsuspectinguser@mymailserver.net<\/strong><br \/>\nJun 15 17:34:10 box1 postfix\/cleanup[1194]: 2E302F8372: prepend: header Received: from Brainfuck (mailclient.example.com [1.3.3.7])??(using TLSv1 with cipher AES128-SHA (128\/128 bits))??(No client certificate requested)??by box1.sys.ccs-baumann.de (Postfi from mailclient.example.com[1.3.3.7]; from=&lt;unsuspectinguser@mymailserver.net&gt; to=&lt;unsuspectinguser@mymailserver.net&gt; proto=ESMTP helo=&lt;Brainfuck&gt;: X-Warn: Received header with non-FQDN (from) other than localhost: Brainfuck<br \/>\nJun 15 17:34:10 box1 postfix\/smtpd[1189]: disconnect from mailclient.example.com[1.3.3.7]<br \/>\nJun 15 17:34:10 box1 postfix\/cleanup[1194]: B0C88F8373: prepend: header Received: from Brainfuck (mailclient.example.com [1.3.3.7])??(using TLSv1 with cipher AES128-SHA (128\/128 bits))??(No client certificate requested)??by box1.sys.ccs-baumann.de (Postfi from box1.sys.ccs-baumann.de.local[127.0.0.1]; from=&lt;unsuspectinguser@mymailserver.net&gt; to=&lt;unsuspectinguser@mymailserver.net&gt; proto=ESMTP helo=&lt;localhost&gt;: X-Warn: Received header with non-FQDN (from) other than localhost: Brainfuck<br \/>\nJun 15 17:34:10 box1 amavis[31547]: (31547-09) Passed BAD-HEADER, [1.3.3.7] [1.3.3.7] &lt;unsuspectinguser@mymailserver.net&gt; -&gt; &lt;unsuspectinguser@mymailserver.net&gt;, quarantine: w\/badh-woDe-4ipbIKk, mail_id: woDe-4ipbIKk, Hits: -, size: 793, queued_as: B0C88F8373, 205 ms<\/code><\/p>\n<p>Wie es scheint, probiert Outlook somit der Reihe nach NTLM, DIGEST-MD5 und LOGIN (Plain).<\/p>\n<p>Nun sollte man annehmen, dass der Postfix f\u00fcr die zu verwendenden Algorithmen eine Einstellung bietet. Und wenn man <a href=\"http:\/\/www.postfix.org\/SASL_README.html#smtpd_sasl_security_options\">rein nach der Dokumentation<\/a> geht, stimmt dies auch. Nur Schade, wenn das nicht funktioniert:<\/p>\n<pre>smtpd_sasl_security_options  = noanonymous, noplaintext\r\nsmtpd_sasl_tls_security_options = noanonymous\r\nsmtp_sasl_mechanism_filter = !ntlm, static:all<\/pre>\n<p>Auch die explizite Angabe erlaubter Verfahren funktionierte leider nicht:<\/p>\n<pre>smtpd_sasl_security_options  = noanonymous, noplaintext\r\nsmtpd_sasl_tls_security_options = noanonymous\r\nsmtp_sasl_mechanism_filter = plain, login<\/pre>\n<p>Also doch zur etwas brutaleren Art \u00fcbergehen: <a href=\"http:\/\/yocum.org\/faqs\/postfix-tls-sasl.html\">Deaktivieren wir die Verfahren auf Ebene von SASL2<\/a> direkt:<\/p>\n<pre lang=\"bash\">cd \/usr\/lib\/sasl2\r\nmkdir disabled\r\nmv *ntlm* disabled\r\nmv *digestmd5* disabled<\/pre>\n<p>Kurz noch mal testen lassen und siehe da: Funktioniert. Die Variante mit eigener smtpd.conf wird daher auf sp\u00e4ter warten m\u00fcssen.<\/p>\n<p class=\"wp-flattr-button\"><a href=\"https:\/\/blog.benny-baumann.de\/?flattrss_redirect&amp;id=702&amp;md5=59bf0b3eadb280dab5098bff1ef9b115\" title=\"Flattr\" target=\"_blank\"><img src=\"http:\/\/blog.benny-baumann.de\/wp-content\/plugins\/flattr\/img\/flattr-badge-large.png\" srcset=\"http:\/\/blog.benny-baumann.de\/wp-content\/plugins\/flattr\/img\/flattr-badge-large.png\" alt=\"Flattr this!\"\/><\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>Seit kurzem habe ich meinen Mailserver in Bezug auf die Authentifizierung und den Mailversand etwas strenger eingestellt, was soviel hei\u00dft wie &#8222;ein Fehler und die Verbindung wird geschlossen&#8220;. Dieser Ansatz funktioniert auch f\u00fcr die Mail-Einlieferung wunderbar, f\u00fcr den Versand mit Outlook ergibt sich aber ein kleines Problem.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[4],"tags":[10,287,286,204,285,346],"class_list":["post-702","post","type-post","status-publish","format-standard","hentry","category-server","tag-debian","tag-ntlm","tag-outlook","tag-postfix","tag-sasl","tag-server"],"_links":{"self":[{"href":"https:\/\/blog.benny-baumann.de\/index.php?rest_route=\/wp\/v2\/posts\/702","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.benny-baumann.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.benny-baumann.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.benny-baumann.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.benny-baumann.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=702"}],"version-history":[{"count":3,"href":"https:\/\/blog.benny-baumann.de\/index.php?rest_route=\/wp\/v2\/posts\/702\/revisions"}],"predecessor-version":[{"id":704,"href":"https:\/\/blog.benny-baumann.de\/index.php?rest_route=\/wp\/v2\/posts\/702\/revisions\/704"}],"wp:attachment":[{"href":"https:\/\/blog.benny-baumann.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=702"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.benny-baumann.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=702"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.benny-baumann.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=702"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}