06.14.2006 14:41

Odd behavior accessing imap folders (authentication failed: courier-imap, sylpheed, kmail, balsa, evolution)


I admin the box (well, it's relly a linode.com account running a user-mode Linux kernel) on which this blog runs, and about two years ago, when devmike.com went live on the 'net, I installed and configured the Debian sarge courier-imap package. I tried out a number of MUAs (mail user agents) to access the imap folders, and settled on sylpheed (sylpheed's home page is here).

So, I created an account in sylpheed and set the 'basic' options to protocol IMAP4 and the 'receive' options to 'automatic'. I was able to connect to the courier-imap server and authenticate / login, and read, compose and send mail.

About two days ago, I started getting an 'authentication failed' message in sylpheed's logs, and was unable to read mail. I can ssh to devmike.com, and checked some configuration settings in the courier-imap server on devmike.com. I also tried changing sylpheed's options for my mail accout to 'CRAM-MD5' and to 'LOGIN'.

The courier-imap configuration I had set up had this line in /etc/courier/authdaemonrc:
authmodulelist="authpam"
which means logins will be authenticated via pam, effectively meaning that I use my user account password to access my email via imap. /etc/pam.d/imap contains
auth required pam_unix.so nullok
account required pam_unix.so
password required pam_unix.so
session required pam_unix.so
One thing I tried was to change my user account password and then set the imap password to the new user account password, by doing
# userdbpw | userdb "john@example.com" set imappw
where I substituted my username and domain for john@example.com, and then running
# makeuserdb
I did not restart courier-imap, and I probably should have, because after doing those things (changing user account password, resetting the imap password and rebuliding the database), I was still unable to access my email via courier-imap.

It's now working. I can use sylpheed to access my email, using the 'receive' options 'LOGIN' or 'automatic'.