Roundcube Community Forum

 

IMAP Authentication failure - hopefully a quick fix!

Started by GrapeSoda, March 19, 2013, 06:43:46 AM

Previous topic - Next topic

GrapeSoda

I have an OSX Mountain Lion Mailserver with Roundcube installed locally. However I can't seem to authenticate at all.

Here is the CAPABILITY telnet gives me:
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE START
TLS LOGINDISABLED XAPPLEPUSHSERVICE AUTH=CRAM-MD5 AUTH=DIGEST-MD5 AUTH=GSSAPI] D
ovecot ready.


Here is the relevant part of my config file:

$rcmail_config['default_host'] = 'tls://localhost';
$rcmail_config['default_port'] = 143;
$rcmail_config['imap_auth_type'] = DIGEST-MD5;


All other IMAP settings are still as their defaults, however I can provide the full config upon request.

This I have tried: 127.0.0.1, the outside domain, ssl, tls, plain, blank auth type (so it's determined automatically). All seem to work server wise, I get the same authentication failed message rather than a failed to connect message. Logs seem to provide no further information into the matter.

I can confirm SMTP works fine in roundcube, and logging in via Mail.app works fine. I've confirmed I'm using correct credentials in the [email protected]:password format. I can also confirm it isn't blacklist/IP related - we have tried from multiple locations.

Hopefully I am missing something obvious and it's a simple fix.

Thanks in advance.

SKaero


GrapeSoda

Yes, in both /?_step=3 and the standard login page I get the same problem.

SKaero

I just noticed DIGEST-MD5 should have quotes around it:
$rcmail_config['imap_auth_type'] = 'DIGEST-MD5'

If that doesn't work enable imap_debug and post the log.

benbull

I'm having exactly the same issues on ML Server 10.8.3

[09-Apr-2013 10:10:21 +0100]: [CF6D] S: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE XAPPLEPUSHSERVICE AUTH=CRAM-MD5 AUTH=X-PLAIN-SUBMIT AUTH=DIGEST-MD5 AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
[09-Apr-2013 10:10:21 +0100]: [CF6D] C: A0001 ID ("name" "Roundcube Webmail" "version" "0.8.6" "php" "5.3.15" "os" "Darwin" "command" "/")
[09-Apr-2013 10:10:21 +0100]: [CF6D] S: * ID ("name" "Dovecot" "version" "2.0.19apple1")
[09-Apr-2013 10:10:21 +0100]: [CF6D] S: A0001 OK ID completed.
[09-Apr-2013 10:10:21 +0100]: [CF6D] C: A0002 AUTHENTICATE DIGEST-MD5
[09-Apr-2013 10:10:21 +0100]: [CF6D] S: [a hash]
[09-Apr-2013 10:10:21 +0100]: [CF6D] C:[a hash]
[09-Apr-2013 10:10:23 +0100]: [CF6D] S: A0002 NO [AUTHENTICATIONFAILED] Authentication failed.
[09-Apr-2013 10:10:23 +0100]: [CF6D] C: A0003 LOGOUT
[09-Apr-2013 10:10:23 +0100]: [CF6D] S: * BYE Logging out
[09-Apr-2013 10:10:23 +0100]: [CF6D] S: A0003 OK Logout completed.
[09-Apr-2013 11:13:48 +0100]: [C04F] C: A0001 LOGOUT


My IMAP config is as follows;

$rcmail_config['default_host'] = 'tls://[my domain name].com';

// TCP port used for IMAP connections
$rcmail_config['default_port'] = 8993;

// IMAP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
// best server supported one)
$rcmail_config['imap_auth_type'] = '';


On the installer imap test I get this;

Connecting to tls://[my domain].com...
IMAP connect:  NOT OK(Login failed for webmaster from 192.168.1.254. Empty startup greeting ([my domain].com:8993))


My domain is fully qualified and I'm naming the server with its external name.  I've tried so many combinations in the config I'm now a bit lost.  Any help would be greatly appreciated.

benbull

Amazing what a pause and post on a forum can do for the thinking process, I've solved it - turns out I was using the wrong port with TLS, I've now mapped to 143 internally on my firewall and all is well.