Wednesday, October 17, 2007

Virtual Exim cyrus-imap saslauthd pam-mysql Login Problem

Cyrus POP3 Login Error:
[root@ ~]# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
+OK centos.domain.com Cyrus POP3 v2.3.7-Invoca-RPM-2.3.7-1.1.el5 server ready <3974298939.1192619430@centos.domain.com>
user user@domain.com
+OK Name is a valid mailbox
pass password
-ERR [AUTH] Invalid login
quit
+OK
Connection closed by foreign host.


saslauthd error:
[root@ ~]# tail -f /var/log/messages
Oct 17 17:12:52 centos5 saslauthd[24323]: do_auth : auth failure: [user=user] [service=pop] [realm=domain.com] [mech=pam] [reason=PAM auth error]


To allow the user@domain.com to be used for pam_mysql authentication, edit /etc/sysconfig/saslauthd and set FLAGS=-r

[root@ ~]# nano /etc/sysconfig/saslauthd
# Directory in which to place saslauthd's listening socket, pid file, and so
# on. This directory must already exist.
SOCKETDIR=/var/run/saslauthd

# Mechanism to use when checking passwords. Run "saslauthd -v" to get a list
# of which mechanism your installation was compiled with the ablity to use.
MECH=pam

# Additional flags to pass to saslauthd on the command line. See saslauthd(8)
# for the list of accepted flags.
FLAGS=-r



[root@ ~]# cat /etc/pam.d/pop
#%PAM-1.0
auth sufficient pam_mysql.so user=vexim passwd=vexim_pw host=localhost db=vexim table=users usercolumn=username passwdcolumn=crypt crypt=1
account required pam_mysql.so user=vexim passwd=vexim_pw host=localhost db=vexim table=users usercolumn=username passwdcolumn=crypt crypt=1

No comments: