Hi,
I was having the same issue, so I tried this suggestion, but it did not work for me.
Here’s my situation:
1. I have setup the mail server using the guide at:
http://flurdy.com/docs/postfix/2. I can send and receive email from all major email clients (Apple Mail, Mobile Mail on iOS, etc.).
3. I tested the mail server using telnet as described in the guide (see #1).
4. I was able to install Roundcube and configure it.
5. At the “Testing Config” stage of the Roundcube installer, everything is OK, except Test IMAP Config.
my <rcube root>/config/main.inc.php:
// ----------------------------------
// IMAP
// ----------------------------------
$rcmail_config['default_host'] = 'ssl://localhost';
// TCP port used for IMAP connections
$rcmail_config['default_port'] = 143;
// IMAP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
// best server supported one)
$rcmail_config['imap_auth_type'] = ‘LOGIN';
// If you know your imap's folder delimiter, you can specify it here.
// Otherwise it will be determined automatically
$rcmail_config['imap_delimiter'] = 'INBOX';
The IMAP config test keeps failing with the following error message:
Connecting to ssl://localhost...
IMAP connect: NOT OK(Login failed for username@example.com from XX.XXX.XX.XXX. AUTHENTICATE CRAM-MD5: A0001 NO Login failed.)
mail.log shows this when the ‘Check Login’ button is clicked:
Mar 19 19:18:41 ip-10-10-23-234 imapd-ssl: Connection, ip=[::ffff:127.0.0.1]
Mar 19 19:18:42 ip-10-10-23-234 authdaemond: received auth request, service=imap, authtype=cram-md5
Mar 19 19:18:42 ip-10-10-23-234 authdaemond: authmysql: trying this module
Mar 19 19:18:42 ip-10-10-23-234 authdaemond: cram: challenge=PDgwQkJCM0UyRkE4ODBBNDM4OTQzNDIzNUY1RkZGRTFGQGlwLTEwLTEwLTIzLTIzND4=, response=ZmFyaGFuQHdpcmVkdG9tYXRvLmNvbSBkNzVjMDQwYTNkMmFhMjRiYTQ3YjBkNzM2Y2Y2NDg5Mg==
Mar 19 19:18:42 ip-10-10-23-234 authdaemond: cram: decoded challenge/response, username ‘username@example.com'
Mar 19 19:18:42 ip-10-10-23-234 authdaemond: authmysqllib: connected. Versions: header 50517, client 50529, server 50529
Mar 19 19:18:42 ip-10-10-23-234 authdaemond: SQL query: SELECT id, crypt, "", uid, gid, home, concat(home, '/', maildir), "", name, "" FROM users WHERE id = ‘username@example.com' AND (enabled=1)
Mar 19 19:18:42 ip-10-10-23-234 authdaemond: authmysql: REJECT - try next module
Mar 19 19:18:42 ip-10-10-23-234 authdaemond: FAIL, all modules rejected
Mar 19 19:18:42 ip-10-10-23-234 imapd-ssl: LOGIN FAILED, method=CRAM-MD5, ip=[::ffff:127.0.0.1]
For comparison heres the mail.log for when I use the Mobile mail on my iPhone:
Mar 19 19:18:43 ip-10-10-23-234 imapd: Connection, ip=[::ffff:XX.XXX.XX.XXX]
Mar 19 19:18:43 ip-10-10-23-234 authdaemond: received auth request, service=imap, authtype=login
Mar 19 19:18:43 ip-10-10-23-234 authdaemond: authmysql: trying this module
Mar 19 19:18:43 ip-10-10-23-234 authdaemond: SQL query: SELECT id, crypt, "", uid, gid, home, concat(home, '/', maildir), "", name, "" FROM users WHERE id = ‘username@example.com' AND (enabled=1)
Mar 19 19:18:43 ip-10-10-23-234 authdaemond: password matches successfully
Mar 19 19:18:43 ip-10-10-23-234 authdaemond: authmysql: sysusername=<null>, sysuserid=5000, sysgroupid=5000, homedir=/var/spool/mail/virtual, address=username@example.com, fullname=username, maildir=/var/spool/mail/virtual/username/, quota=<null>, options=<null>
Mar 19 19:18:43 ip-10-10-23-234 authdaemond: Authenticated: sysusername=<null>, sysuserid=5000, sysgroupid=5000, homedir=/var/spool/mail/virtual, address=username@example.com, fullname=farhan, maildir=/var/spool/mail/virtual/username/, quota=<null>, options=<null>
So I have two questions:
1. Why is RoundCube not sending the request using the auth type set to ‘LOGIN’, when that is what is defined in the configuration file?
2. Even when I set the auth type to ‘PLAIN’ the IMAP config test fails with the same error message.
Any help will be greatly appreciated.
Cheers,
Insha