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

-- 
Roberto C. Sanchez
http://familiasanchez.net/~roberto

Attachment: signature.asc
Description: Digital signature

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Courier-imap mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap

Reply via email to