Roundcube SMTP authentication problem

ychaouche

Valued Member
Hi

I just installed roundcube. On the installer's testing page, when I try to authenticate as a.chaouche@xxx, I get an authentication failure. When I look at my syslog, I see that instead of receiving a.chaouche@xxx it only receives the mailbox part a.chaouche without the @domain part

Code:
Mar 29 13:24:07 messagerie authdaemond: received auth request, service=imap, authtype=login
Mar 29 13:24:07 messagerie authdaemond: authmysql: trying this module
Mar 29 13:24:07 messagerie authdaemond: authmysqllib: connected. Versions: header 50539, client 50547, server 50547
Mar 29 13:24:07 messagerie authdaemond: SQL query: SELECT email, password, "", 113, 120, "/var/vmail/", maildir, quota, 0, "" FROM users WHERE email = 'a.chaouche'
Mar 29 13:24:07 messagerie authdaemond: zero rows returned
Mar 29 13:24:07 messagerie authdaemond: no password available to compare
Mar 29 13:24:07 messagerie authdaemond: authmysql: REJECT - try next module
Mar 29 13:24:07 messagerie authdaemond: FAIL, all modules rejected
Mar 29 13:24:07 messagerie imapd: LOGIN FAILED, user=a.chaouche, ip=[::1]
Mar 29 13:24:13 messagerie postfix/smtpd[11291]: warning: localhost[::1]: SASL LOGIN authentication failed: authentication failure
Mar 29 13:24:13 messagerie imapd: LOGOUT, ip=[::1], rcvd=64, sent=342
Mar 29 13:24:13 messagerie postfix/smtpd[11291]: disconnect from localhost[::1]


testsaslauthd works fine on the console (I am using cyrus with rimap backend)

Code:
root@messagerie[10.10.10.20] /var/www/roundcubemail-1.1.4 # testsaslauthd -u a.chaouche@xxx -p yassineradio -f /var/run/saslauthd/mux 
0: OK "Success."
root@messagerie[10.10.10.20] /var/www/roundcubemail-1.1.4 #

also, the logs generated by that command shows that the login is conveyed correctly (a.chaouche@xxx instead of just a.chaouche)

Code:
Mar 29 13:54:43 messagerie authdaemond: received auth request, service=imap, authtype=login
Mar 29 13:54:43 messagerie authdaemond: authmysql: trying this module
Mar 29 13:54:43 messagerie authdaemond: authmysqllib: connected. Versions: header 50539, client 50547, server 50547
Mar 29 13:54:43 messagerie authdaemond: SQL query: SELECT email, password, "", 113, 120, "/var/vmail/", maildir, quota, 0, "" FROM users WHERE email = 'a.chaouche@xxx'
Mar 29 13:54:43 messagerie authdaemond: password matches successfully
Mar 29 13:54:43 messagerie authdaemond: authmysql: sysusername=<null>, sysuserid=113, sysgroupid=120, homedir=/var/vmail/, address=a.chaouche@xxx, fullname=0, maildir=xxx/a.chaouche/, quota=1073741824, options=<null>
Mar 29 13:54:43 messagerie authdaemond: authmysql: clearpasswd=<null>, passwd=xxx
Mar 29 13:54:43 messagerie authdaemond: Authenticated: sysusername=<null>, sysuserid=113, sysgroupid=120, homedir=/var/vmail/, address=a.chaouche@xxx, fullname=0, maildir=xxx/a.chaouche/, quota=1073741824, options=<null>
Mar 29 13:54:43 messagerie authdaemond: Authenticated: clearpasswd=yassineradio, passwd=G2MWHcuJgmKRA
Mar 29 13:54:43 messagerie imapd: LOGIN, user=a.chaouche@xxx, ip=[::1], port=[58616], protocol=IMAP
Mar 29 13:54:44 messagerie imapd: LOGOUT, user=a.chaouche@xxx ip=[::1], headers=0, body=0, rcvd=19, sent=96, time=1

How do I fix the test from roundcube ?
 

ychaouche

Valued Member
Oh, I missed the -r in saslauthd's configuration file. It should look like this :

Code:
root@messagerie[10.10.10.20] ~ # removeblanks /etc/default/saslauthd
START=yes
DESC="SASL Authentication Daemon"
NAME="saslauthd"
MECHANISMS="rimap"
MECH_OPTIONS=""
THREADS=5
OPTIONS="-c -m /var/run/saslauthd -O localhost -r"
root@messagerie[10.10.10.20] ~ #

The -r part is what makes the login name parsed entirely. In saslauth terminology, the "realm" (domain.tld) is added to the login (email) so it becomes email@domain.tld
 
Top