Hello!

I'm using courier-imap as an imap proxy to an Exchange server. I wrote a 
small script in Python to do the authentication with authpipe.

The odd thing is that courier-imap uses the email address instead of the 
username when loging to the Exchange server.

Note that I do not have any problem with authlib, authentication works 
great.

Here is the output in syslog (I replaced with xxxx the domain names and 
passwords):

Jul 26 10:53:27 localhost authdaemond: Authenticated: 
sysusername=torregi, sysuserid=111, sysgroupid=111, 
homedir=/usr/db/mail/repository/torregi, address=torregi, 
fullname=NoName NoLastName, maildir=Maildir, quota=10485760S,1000C, 
options=mailhost=xxxxxxxxx

--> Note that "address" is torregi, instead of [EMAIL PROTECTED] This is 
why it works.

Jul 26 10:53:27 localhost imapd: imap.tecnomen.com: * OK Microsoft 
Exchange Server 2003 IMAP4rev1 server version 6.5.7638.1 (xxxxxxxx) ready.

Jul 26 10:53:27 localhost imapd: Sending: 1 LOGIN "torregi" "xxxxxxx"..

Jul 26 10:53:27 localhost imapd: Received: 1 OK LOGIN completed.


However, when my script returns the email address, it does not work. 
Because courier-imap wants to login with the email address. See:

Jul 26 11:12:54 localhost authdaemond: Authenticated: 
sysusername=torregi, sysuserid=111, sysgroupid=111, 
homedir=/usr/db/mail/repository/torregi, [EMAIL PROTECTED], 
fullname=NoName NoLastName, maildir=Maildir, quota=10485760S,1000C, 
options=mailhost=imap.tecnomen.com

--> Note that address is [EMAIL PROTECTED], so it does not work.

Jul 26 11:12:54 localhost imapd: xxxxxxx: * OK Microsoft Exchange Server 
2003 IMAP4rev1 server version 6.5.7638.1 (xxxxxxxx) ready.

Jul 26 11:12:54 localhost imapd: Sending: 2 LOGIN "[EMAIL PROTECTED]" 
"xxxxxxxxx"..

--> Note! It's using the email address to login to Exchange.

Jul 26 11:12:54 localhost imapd: Received: 2 NO Logon failure: unknown 
user name or bad password.

I compiled courier-authlib and courier-imap from these files:

courier-authlib-0.58.tar.bz2
courier-imap-4.1.1.tar.bz2

I'm testing on Ubuntu 6.06.

Would any of you have any clue what I'm doing wrong? The authlib 
documentation seems to be quite clear that authpipe expects the email 
address in the ADDRESS field. The authlib documentation also says:

"Courier can operate in IMAP/POP3 proxy mode only when the Courier 
Authentication Library uses the userdb, LDAP, MySQL, or the PostgreSQL 
authentication module."

Could that be it? I'm using authpipe, the script uses a mysql database 
and it chooses the final imap server, based on the homedir variable. 
Hence, I could not use mysql authentication module.

This my imapd:

ADDRESS=127.0.0.1
PORT=143
MAXDAEMONS=40
MAXPERIP=4
PIDFILE=/var/run/imapd.pid
TCPDOPTS="-nodnslookup -noidentlookup"
LOGGEROPTS="-name=imapd"
DEFDOMAIN=
IMAP_CAPABILITY="IMAP4rev1 UIDPLUS CHILDREN NAMESPACE 
THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE"
IMAP_KEYWORDS=1
IMAP_ACL=1
IMAP_CAPABILITY_ORIG="IMAP4rev1 UIDPLUS CHILDREN NAMESPACE 
THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA AUTH=CRAM-MD5 
AUTH=CRAM-SHA1 AUTH=CRAM-SHA256 IDLE"
IMAP_PROXY=1
IMAP_PROXY_FOREIGN=0
IMAP_IDLE_TIMEOUT=60
IMAP_CAPABILITY_TLS="$IMAP_CAPABILITY AUTH=PLAIN"
IMAP_CAPABILITY_TLS_ORIG="$IMAP_CAPABILITY_ORIG AUTH=PLAIN"
IMAP_DISABLETHREADSORT=0
IMAP_CHECK_ALL_FOLDERS=0
IMAP_OBSOLETE_CLIENT=0
IMAP_UMASK=022
IMAP_ULIMITD=65536
IMAP_USELOCKS=1
IMAP_SHAREDINDEXFILE=/usr/local/courier-imap/etc/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=Maildir
DEBUG_LOGIN=2

Any help would be appreciated!

Br, Giovanni Torres

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Courier-imap mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap

Reply via email to