[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[HELP] courier-authdaemon frustration



Hi all! Helppp!!

I am having a frustrating time and can use some help! Using Christoph
Haas's tutorial (http://workaround.org/articles/ispmail-sarge/) I am
trying to set up a server with virtual mailboxes using postfix, mysql
and courier-imap-ssl. The machine is an up-to-date Debian testing box.

I have the postfix/mysql part working great. Mail is delivered to the
virtual mailboxes. Getting courier-imap-ssl working is proving extremely
frustrating. The culprit seems to be courier-authdaemon, which annoyingly,
doesn't provide much useful debug info in the logs. :-/

Googling turns up quite a few references to courier-authdaemon's
"TEMPFAIL" errors but no real solutions. Mention is made to be sure there
are no trailing spaces in /etc/courier/ config files.  Some say spaces can
be used to separate the values in each line. Others say only use tabs.
I have tried both ways--no difference. I have gone over the config files
carefully.

>From a remote machine I tried:
telnet -z ssl theshed.dhs.org 993 (which connects & gets a response from IMAP)
. login foobar foobarsecret       (dummy test account I created)
. NO login failed.                (server's response)
Connection closed by foreign host.

On the server side I get:
in /var/log/debug ...

Nov 21 15:43:02 pigpen imapd-ssl: LOGIN: DEBUG: ip=[::ffff:x.x.x.x], command=LOGIN
Nov 21 15:43:02 pigpen imapd-ssl: LOGIN: DEBUG: ip=[::ffff:x.x.x.x], username=foobar@theshed.dhs.org
Nov 21 15:43:02 pigpen imapd-ssl: LOGIN: DEBUG: ip=[::ffff:x.x.x.x], password=foobarsecret
Nov 21 15:43:02 pigpen imapd-ssl: authdaemon: starting client module
Nov 21 15:43:02 pigpen imapd-ssl: authdaemon: TEMPFAIL - no more modules will be tried
Nov 21 15:43:07 pigpgen imapd-ssl: LOGIN FAILED, ip=[::ffff:x.x.x.x]

In /var/log/mysql/mysql.log ...
041121 19:22:18	    136 Connect     XXXXXXX@localhost on 
		    136 Init DB     provider
		    136 Query       SELECT email, "", XXXXXXXXXXXX, 5000, 5000, '/home/vmail', concat(email,'/'), "", "", "" FROM users WHERE email = "foobar@theshed.dhs.org"
		    136 Quit       
		    137 Connect     XXXXXXX@localhost on 
		    137 Init DB     provider
		    137 Query       SELECT email, "", XXXXXXXXXXXX, 5000, 5000, '/home/vmail', concat(email,'/'), "", "", "" FROM users WHERE email = "foobar@theshed.dhs.org"
		    137 Quit       

NOTE: The "" before 'FROM users' seems wrong. But don't know where it
comes from, i.e. there are no extra quotes in the config files.

I'll append the config files below. I'd appreciate any help getting 
Courier authdaemon going. From Google searches, etc. I have learned lots
of folks seem to have problems with authdaemon--and many don't. Seems to
be very black magic stuff, which is very annoying when you don't have the
spells. I like Courier but this becoming a real bear to configure.
At this point, I would gladly switch if there were a better IMAP-SSL server
UW's is to slow. I'm open to suggestions.

Help? Clues would be most welcome!! I'm running out of hair to pull. :-)

Thanks for the help...  bob

And the config files set up as recommended in Christoph's tutorial...

/etc/courier/authmysqlrc:
MYSQL_SERVER	127.0.0.1
MYSQL_USERNAME	XXXXXXX
MYSQL_PASSWORD	XXXXXXXXXXXX
MYSQL_SOCKET	/var/run/mysqld/mysqld.sock
#MYSQL_PORT	3306
MYSQL_PORT	0
MYSQL_OPT	0
MYSQL_DATABASE	provider
MYSQL_USER_TABLE	users
MYSQL_CLEAR_PWFIELD	XXXXXXXXXXXX
DEFAULT_DOMAIN	theshed.dhs.org
MYSQL_UID_FIELD	5000
MYSQL_GID_FIELD	5000
MYSQL_LOGIN_FIELD	email
MYSQL_HOME_FIELD	"/home/vmail"
MYSQL_MAILDIR_FIELD	concat(email,'/')
#


/etc/courier/authdaemonrc:
authmodulelist="authmysql"
authmodulelistorig="authcustom authcram authuserdb authldap authmysql authpam"
daemons=5
version=""
authdaemonvar=/var/run/courier/authdaemon


/etc/courier/imapd
ADDRESS=0
PORT=143
MAXDAEMONS=40
MAXPERIP=20
PIDFILE=/var/run/courier/imapd.pid
TCPDOPTS="-nodnslookup -noidentlookup"
AUTHMODULES="authdaemon"
AUTHMODULES_ORIG="authdaemon"
#DEBUG_LOGIN=0
DEBUG_LOGIN=2
IMAP_CAPABILITY="IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA AUTH=CRAM-MD5 AUTH=CRAM-SHA1 IDLE"
#
IMAP_KEYWORDS=1
IMAP_IDLE_TIMEOUT=60
IMAP_CAPABILITY_TLS="$IMAP_CAPABILITY AUTH=PLAIN"
IMAP_DISABLETHREADSORT=0
IMAP_CHECK_ALL_FOLDERS=0
IMAP_OBSOLETE_CLIENT=0
IMAP_ULIMITD=65536
IMAP_USELOCKS=1
IMAP_SHAREDINDEXFILE=/etc/courier/shared/index
IMAP_ENHANCEDIDLE=0
IMAP_TRASHFOLDERNAME=Trash
IMAP_EMPTYTRASH=Trash:7
IMAP_MOVE_EXPUNGE_TO_TRASH=0
SENDMAIL=/usr/sbin/sendmail
HEADERFROM=X-IMAP-Sender
IMAPDSTART=YES
MAILDIRPATH=/home/vmail


And /etc/courier/imapd-ssl:
SSLPORT=993
SSLADDRESS=0
SSLPIDFILE=/var/run/courier/imapd-ssl.pid
IMAPDSSLSTART=YES
IMAPDSTARTTLS=YES
IMAP_TLS_REQUIRED=0
DEBUG_LOGIN=2
COURIERTLS=/usr/bin/couriertls
TLS_PROTOCOL=SSL3
TLS_STARTTLS_PROTOCOL=TLS1
TLS_CERTFILE=/etc/courier/imapd.pem
TLS_VERIFYPEER=NONE
TLS_CACHEFILE=/var/lib/courier/couriersslcache
TLS_CACHESIZE=524288
MAILDIRPATH=/home/vmail


-- 
  bob billson        email: reb@bhive.dhs.org          ham: kc2wz   /)
                            reb@elbnet.com             beekeeper -8|||}
  "Níl aon tinteán mar do thinteán féin." --Dorothy    Linux geek   \)



Reply to: