{"id":71,"date":"2009-03-01T23:03:26","date_gmt":"2009-03-01T21:03:26","guid":{"rendered":"http:\/\/bergs.biz\/blog\/?p=71"},"modified":"2009-03-10T20:52:48","modified_gmt":"2009-03-10T18:52:48","slug":"courier-imap-could-not-log-in-after-debian-50-upgrade","status":"publish","type":"post","link":"https:\/\/bergs.biz\/blog\/2009\/03\/01\/courier-imap-could-not-log-in-after-debian-50-upgrade\/","title":{"rendered":"Courier IMAP: Could not log in after Debian 5.0 upgrade"},"content":{"rendered":"<p>After I had upgraded my server to Debian 5.0, I found that I could no longer log in via IMAP. I turned authentication debugging on by changing \/etc\/courier\/authdaemonrc as follows:<\/p>\n<pre>DEBUG_LOGIN=1<\/pre>\n<p>This did not reveal any problems. Here&#8217;s an excerpt from mail.info:<\/p>\n<pre>authdaemond: received auth request, service=imap, authtype=cram-md5\r\nauthdaemond: authmysql: trying this module\r\nauthdaemond: cram: challenge=[...], response=[...]\r\nauthdaemond: cram: decoded challenge\/response, username 'user@example.org'\r\nauthdaemond: SQL query: SELECT username, crypt, clear, uid, gid, pop, \"\",\r\n  \"\", realname, \"\" FROM users WHERE username = 'user@example.org'\r\nauthdaemond: cram validation succeeded\r\nauthdaemond: Authenticated: sysusername=&lt;null&gt;, sysuserid=1000,\r\n  sysgroupid=1000, homedir=\/home\/user\/var\/mail\/example.org\/user,\r\n  address=user@example.org, fullname=Joe User, maildir=&lt;null&gt;,\r\n  quota=&lt;null&gt;, options=&lt;null&gt;<\/pre>\n<p>Even though all seemed fine, Thunderbird complained about &#8220;server doesn&#8217;t support secure authentication.&#8221;<\/p>\n<p>So I telnetted into my IMAP server by issuing <code>telnet localhost imap<\/code> and manually logged in as follows:<\/p>\n<pre>a login user@example.org thePass<\/pre>\n<p>Now I noticed immediately what was wrong:<\/p>\n<pre>* BYE [ALERT] Fatal error: Account's mailbox directory is not owned\r\n  by the correct uid or gid:<\/pre>\n<p>The solution is that Courier now by default performs stricter checks on the &#8220;sanity&#8221; of your setup. I changed <code>\/etc\/courier\/imapd<\/code> as follows, and all was fine again:<\/p>\n<pre>IMAP_MAILBOX_SANITY_CHECK=0<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>After I had upgraded my server to Debian 5.0, I found that I could no longer log in via IMAP. I turned authentication debugging on by changing \/etc\/courier\/authdaemonrc as follows: DEBUG_LOGIN=1 This did not reveal any problems. Here&#8217;s an excerpt from mail.info: authdaemond: received auth request, service=imap, authtype=cram-md5 authdaemond: authmysql: trying this module authdaemond: cram: [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,34,33],"tags":[],"class_list":["post-71","post","type-post","status-publish","format-standard","hentry","category-computers","category-debian","category-linux-computers"],"_links":{"self":[{"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/posts\/71","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/comments?post=71"}],"version-history":[{"count":0,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/posts\/71\/revisions"}],"wp:attachment":[{"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/media?parent=71"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/categories?post=71"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/tags?post=71"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}