Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've updated my mail server last night, from Debian etch to lenny. So far I've encountered a problem with my postfix installation, mainly that I managed to broke the IMAP access somehow.

When trying to connect to the IMAP server with Thunderbird, all I get in mail.log is:

Feb 12 11:57:16 mail imapd-ssl: Connection, ip=[::ffff:10.100.200.65] 
Feb 12 11:57:16 mail imapd-ssl: LOGIN: ip=[::ffff:10.100.200.65], command=AUTHENTICATE 
Feb 12 11:57:16 mail authdaemond: received auth request, service=imap, authtype=login 
Feb 12 11:57:16 mail authdaemond: authmysql: trying this module 
Feb 12 11:57:16 mail authdaemond: SQL query: SELECT username, password, "", '105', '105', '/var/virtual', maildir, "", name, "" FROM mailbox WHERE username = 'halka@xoxo.sk'  AND (active=1) 
Feb 12 11:57:16 mail authdaemond: password matches successfully 
Feb 12 11:57:16 mail authdaemond: authmysql: sysusername=<null>, sysuserid=105, sysgroupid=105, homedir=/var/virtual, address=halka@xoxo.sk, fullname=<null>, maildir=xoxo.sk/halka@xoxo.sk/, quota=<null>, options=<null> 
Feb 12 11:57:16 mail authdaemond: Authenticated: sysusername=<null>, sysuserid=105, sysgroupid=105, homedir=/var/virtual, address=halka@xoxo.sk, fullname=<null>, maildir=xoxo.sk/halka@xoxo.sk/, quota=<null>, options=<null>

...and then Thunderbird proceeds to complain that it cant' login / lost connection. Thunderbird is definitely not configured to connect through SSL/TLS.

POP3 (also provided by Courier) is working fine.

I've been mainly looking for a way to make the courier-imap logging more verbose, like can be seen for example here.

Edit: Sorry about the mess, I've found that I've been funneling the log through grep imap, which naturally didn't display entries for authdaemond.

The verbose logging configuration entry is found in /etc/courier/imapd under DEBUG_LOGIN=1 (set to 1 to enable verbose logging, set to 2 to enable dumping plaintext passwords to logfile. Careful.)

share|improve this question

1 Answer 1

up vote 2 down vote accepted

So, after telnetting my mail server, I've finally found the issue.

$ telnet 10.0.0.229 143
Trying 10.0.0.229...
Connected to 10.0.0.229.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION STARTTLS] Courier-IMAP ready. Copyright 1998-2008 Double Precision, Inc.  See COPYING for distribution information.
0 login halka@xoxo.sk redacted
0 OK LOGIN Ok
* BYE [ALERT] Fatal error: Account’s mailbox directory is not owned by the correct uid or gid:

As it turns out, a not-so-recent change to courier-imap introduced some extra sanity checking for user maildirs. As a workaround, I've added IMAP_MAILBOX_SANITY_CHECK=0 to my /etc/courier/imapd (path will probably be different for you).

Though this is just an ugly workaround, it may help someone experiencing the same problems. Still, I'd like to pass the extra sanity checks.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.