atom feed14 messages in net.sourceforge.lists.courier-imapRe: [Courier-imap] Problem authentica...
FromSent OnAttachments
Roberto C. SanchezAug 7, 2006 7:16 am 
Jay LeeAug 7, 2006 7:44 am 
Roberto C. SanchezAug 7, 2006 7:50 am 
Jay LeeAug 7, 2006 7:53 am 
Roberto C. SanchezAug 7, 2006 8:01 am 
Jay LeeAug 7, 2006 8:09 am 
Roberto C. SanchezAug 7, 2006 8:12 am 
Brian CandlerAug 7, 2006 12:14 pm 
Roberto C. SanchezAug 8, 2006 5:03 pm 
Brian CandlerAug 9, 2006 5:45 am 
Roberto C. SanchezAug 9, 2006 5:58 am 
Brian CandlerAug 9, 2006 6:29 am.rc
Roberto C. SanchezAug 9, 2006 6:46 am 
Roberto C. SanchezAug 9, 2006 7:41 am 
Subject:Re: [Courier-imap] Problem authenticating imap users
From:Roberto C. Sanchez (robe@familiasanchez.net)
Date:Aug 9, 2006 5:58:10 am
List:net.sourceforge.lists.courier-imap

On Wed, Aug 09, 2006 at 01:45:43PM +0100, Brian Candler wrote:

On Tue, Aug 08, 2006 at 08:03:09PM -0400, Roberto C. Sanchez wrote:

Aug 7 19:30:37 arecibo authdaemond.pgsql: dopam successful Aug 7 19:30:37 arecibo authdaemond.pgsql: authpam: ACCEPT, username roberto Aug 7 19:30:37 arecibo imaplogin: chdir Maildir: No such file or directory

Now, in this case, roberto is my username and have a real account on the system, not a virtual account. So, the authpgsql attempt fails and it falls back to authpam. It clearly finds me and authenticates me. The problem, of course is that it can't find my maildir. Now, /home/roberto/.Maildir/ exists and is a proper maildir with mail in it.

As you can see, it's looking for 'Maildir' not '.Maildir'

Yes, that did not make sense to me as I have changed the default settings.

I have also set MAILDIRPATH to .Maildir in /etc/courier/{imapd,pop3d} and the ssl variants. I am somewhat baffled by this. Any pointers would be appreciated.

Hmm. Check your startup scripts. They should substitute the value of $MAILDIRPATH into the command line. See if this is happening (by inspection, and/or putting 'set -x' at the top of the script)

# grep -i maildir /etc/init.d/* /etc/init.d/courier-imap:if [ -z "$MAILDIR" ]; then /etc/init.d/courier-imap: MAILDIR=Maildir /etc/init.d/courier-imap: ${bindir}/imapd $MAILDIR" /etc/init.d/courier-imap-ssl:if [ -z "$MAILDIR" ]; then /etc/init.d/courier-imap-ssl: MAILDIR=Maildir /etc/init.d/courier-imap-ssl: ${bindir}/imapd $MAILDIR"

It bears mention that the init scripts are completely unmodified from the way they were installed by the Debian packages. In fact, I have another system which only authenticates system users (i.e., is does not have any virtual users) and it authenticates them perfectly and finds the maildirs with i

You could also try MAILDIRPATH=./.Maildir

That did not work:

Aug 9 08:54:39 arecibo authdaemond.pgsql: restarting authdaemond children Aug 9 08:54:39 arecibo authdaemond.pgsql: modules="authpgsql authpam", daemons=5 Aug 9 08:54:39 arecibo authdaemond.pgsql: modules="authpgsql authpam", daemons=5 Aug 9 08:54:50 arecibo imaplogin: Connection, ip=[::ffff:127.0.0.1] Aug 9 08:54:50 arecibo authdaemond.pgsql: received auth request, service=imap, authtype=login Aug 9 08:54:50 arecibo authdaemond.pgsql: authpgsql: trying this module Aug 9 08:54:50 arecibo authdaemond.pgsql: SQL query: SELECT email, password, '', uid, gid, home, maildir, '', name, '' FROM composite WHERE email = 'roberto' Aug 9 08:54:50 arecibo authdaemond.pgsql: zero rows returned Aug 9 08:54:50 arecibo authdaemond.pgsql: no password available to compare Aug 9 08:54:50 arecibo authdaemond.pgsql: authpgsql: REJECT - try next module Aug 9 08:54:50 arecibo authdaemond.pgsql: authpam: trying this module Aug 9 08:54:50 arecibo authdaemond.pgsql: authpam: sysusername=roberto, sysuserid=<null>, sysgroupid=1000, homedir=/home/roberto, address=roberto, fullname=Roberto C. Sanchez,,,, maildir=<null>, quota=<null>, options=<null> Aug 9 08:54:50 arecibo authdaemond.pgsql: pam_service=imap, pam_username=roberto Aug 9 08:54:50 arecibo authdaemond.pgsql: dopam successful Aug 9 08:54:50 arecibo authdaemond.pgsql: authpam: ACCEPT, username roberto Aug 9 08:54:50 arecibo imaplogin: chdir Maildir: No such file or directory

Show also the output of 'authtest roberto'. This should show no entry for Maildir, which means the default will be used. If it says 'Maildir' then this will override the value set in MAILDIRPATH, but I don't think authpam does this.

# courierauthtest roberto Trying authdaemon... Authenticated: module authdaemon Home directory: /home/roberto UID/GID: 1000/1000 AUTHADDR=roberto AUTHFULLNAME=Roberto C. Sanchez OPTIONS=<none>

That output exactly matches the output from the system with no virtual users on it. I am kind of stumped as to what could be causing this.

Thanks for your help.

-Roberto