cannot log into courier-imap server

Yash Khemani <[email protected]>
Newsgroups gmane.mail.jamm.user
Message-ID <[email protected]>
Hello,

I have a host running redhat linux enterprise 3.  below are the list of  
the package versions installed.

postfix-2.0.16-13
courier-imap-3.0.4-1
courier-imap-ldap-3.0.4-1
openldap-2.0.27-11
jamm-0.9.6
squirrelmail-1.2.11-1

i am able to log into jamm and create domains, accounts and aliases.  i  
can deliver mail through postfix to those accounts.  the accounts i  
create can log into jamm also.

however, a user is not able to successfully log into the courier imap  
or pop3 server.  i enabled debugging in the courier-imap configuration,  
and the following is provided from the maillog file.  courier-imap  
successfully logs into the ldap server and retrieves the information  
about the user.

however, it complains that the password provided (having debugging set  
to 2 prints the password in the log file) does not match the password  
in ldap.  this is illustrated in the following two lines from the log:

Jun 10 18:36:43 rarankar authdaemond.ldap: authldaplib:  
clearpasswd=<null>, passwd={SSHA}7nfp85B5CKVL0ZSGaVv9ERoxemWgUcK3
Jun 10 18:36:43 rarankar authdaemond.ldap: supplied password 'abcdefg'  
does not match encrypted password  
'{SSHA}7nfp85B5CKVL0ZSGaVv9ERoxemWgUcK3'

the log from the entire interaction with courier-imap appears below.

Jun 10 18:36:43 rarankar imapd: Connection, ip=[::ffff:127.0.0.1]
Jun 10 18:36:43 rarankar imapd: LOGIN: DEBUG: ip=[::ffff:127.0.0.1],  
command=LOGIN
Jun 10 18:36:43 rarankar imapd: LOGIN: DEBUG: ip=[::ffff:127.0.0.1],  
[email protected]
Jun 10 18:36:43 rarankar imapd: LOGIN: DEBUG: ip=[::ffff:127.0.0.1],  
password=abcdefg
Jun 10 18:36:43 rarankar imapd: authdaemon: starting client module
Jun 10 18:36:43 rarankar authdaemond.ldap: received auth request,  
service=imap, authtype=login
Jun 10 18:36:43 rarankar authdaemond.ldap: authldap: trying this module
Jun 10 18:36:43 rarankar authdaemond.ldap: selected ldap protocol  
version 3
Jun 10 18:36:43 rarankar authdaemond.ldap: binding to LDAP server as DN  
'cn=root,dc=khemani,dc=com', password 'n8Umz0(wZa'
Jun 10 18:36:43 rarankar authdaemond.ldap: using search filter:  
(&(objectClass=JammMailAccount)(accountActive=TRUE)(delete=FALSE)(mail=u 
[email protected]))
Jun 10 18:36:43 rarankar authdaemond.ldap: one entry returned, DN:  
[email protected],jvd=domain.org,o=hosting,dc=khemani,dc=com
Jun 10 18:36:43 rarankar authdaemond.ldap: raw ldap entry returned:
Jun 10 18:36:43 rarankar authdaemond.ldap: | mail: [email protected]
Jun 10 18:36:43 rarankar authdaemond.ldap: | homeDirectory:  
/home/vmail/domains
Jun 10 18:36:43 rarankar authdaemond.ldap: | mailbox: domain.org/user/
Jun 10 18:36:43 rarankar authdaemond.ldap: | cn: first last
Jun 10 18:36:43 rarankar authdaemond.ldap: | userPassword:  
{SSHA}xxxxxxxxxxxxxxxxxxxxxxxx
Jun 10 18:36:43 rarankar authdaemond.ldap: authldaplib:  
[email protected], sysuserid=1000, sysgroupid=1000,  
homedir=/home/vmail/domains, [email protected], fullname=first  
last, maildir=domain.org/user/, quota=<null>, options=<null>
Jun 10 18:36:43 rarankar authdaemond.ldap: authldaplib:  
clearpasswd=<null>, passwd={SSHA} xxxxxxxxxxxxxxxxxxxxxxxx
Jun 10 18:36:43 rarankar authdaemond.ldap: supplied password 'abcdefg'  
does not match encrypted password '{SSHA} xxxxxxxxxxxxxxxxxxxxxxxx'
Jun 10 18:36:43 rarankar authdaemond.ldap: authldap: REJECT - try next  
module
Jun 10 18:36:43 rarankar authdaemond.ldap: FAIL, all modules rejected
Jun 10 18:36:43 rarankar imapd: authdaemon: REJECT
Jun 10 18:36:48 rarankar imapd: LOGIN FAILED, ip=[::ffff:127.0.0.1]
Jun 10 18:36:48 rarankar imapd: Disconnected, ip=[::ffff:127.0.0.1]

some notes about the configuration -- the only auth option is authldap.  
  i've tried connecting via squirrelmail, via telnet to the imap and the  
pop3 ports, and the results are the same.

also, i've modified the log to have [email protected] as the email and  
i've also modified the passwords.

here are the authdaemonrc and authldaprc files for your reference:

authdaemonrc:
#start
authmodulelist="authldap"
authmodulelistorig="authcustom authcram authuserdb authldap authpgsql  
authmysql authpam"
daemons=5
version="authdaemond.ldap"
authdaemonvar=/var/run/authdaemon.courier-imap
#end

authldaprc:
#start
LDAP_SERVER             127.0.0.1
LDAP_PORT               389
LDAP_PROTOCOL_VERSION   3
LDAP_BASEDN             o=hosting,dc=khemani,dc=com
LDAP_BINDDN             cn=root,dc=khemani,dc=com
LDAP_BINDPW             hijklmnop
LDAP_TIMEOUT            5
LDAP_MAIL               mail
LDAP_FILTER              
(objectClass=JammMailAccount)(accountActive=TRUE)(delete=FALSE)
LDAP_GLOB_UID           vmail
LDAP_GLOB_GID           vmail
LDAP_HOMEDIR            homeDirectory
LDAP_MAILDIR            mailbox
LDAP_DEFAULTDELIVERY    defaultDelivery
LDAP_FULLNAME           cn
LDAP_CLEARPW            clearPassword
LDAP_CRYPTPW            userPassword
LDAP_DEREF              never
LDAP_TLS                0
#end

i'd appreciate any insight anyone could provide on this situation.   
your help is sincerely appreciated.

thanks,
yash



-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the
one installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.