Linode Forum
https://forum.linode.com/

How to get IMAP/SSL (993) working?
https://forum.linode.com/viewtopic.php?f=11&t=9903
Page 1 of 1

Author:  MDesigner [ Sat Mar 23, 2013 5:43 am ]
Post subject:  How to get IMAP/SSL (993) working?

Anyone know how to get IMAP over SSL working? The way to test it is by issuing this command:

Code:
$ openssl s_client -connect localhost:993


And then once you get an "OK" message, type: 1 Login someuser somepass

On a correct setup (like Apple's iCloud), it will say you authenticated OK, or authentication failed. I can't get those responses with my IMAPS server.

Author:  MDesigner [ Sat Mar 23, 2013 1:41 pm ]
Post subject:  Re: How to get IMAP/SSL (993) working?

It seems I should be getting a handshake message like this:

Code:
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE STARTTLS AUTH=PLAIN] Dovecot ready.


But I'm not. I don't think Dovecot is set up properly. Port 993 is definitely there and using SSL which is great. But my mail client doesn't like the lack of the CAPABILITY handshake.

Author:  sweh [ Sat Mar 23, 2013 2:40 pm ]
Post subject:  Re: How to get IMAP/SSL (993) working?

Check dovecot.conf
Code:
  # Send IMAP capabilities in greeting message. This makes it unnecessary for
  # clients to request it with CAPABILITY command, so it saves one round-trip.
  # Many clients however don't understand it and ask the CAPABILITY anyway.
  #login_greeting_capability = no

With this set to "yes" then the capability list is sent at connection time (restart dovecot after making the change)

Author:  MDesigner [ Sat Mar 23, 2013 3:00 pm ]
Post subject:  Re: How to get IMAP/SSL (993) working?

That is an invalid setting. This is dovecot v2 on Ubuntu 12.04 LTS.

Author:  MDesigner [ Sat Mar 23, 2013 3:21 pm ]
Post subject:  Re: How to get IMAP/SSL (993) working?

Further details (I've sent this to support as well):

$ openssl s_client -connect localhost:993

If I see this line:
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN] Dovecot ready.

Then I know I'm good. And then I type:

1 Login bob bobpass

And see:
1 NO [AUTHENTICATIONFAILED] Authentication failed.

However, if I follow the instructions Linode has posted for Ubuntu, when I issue the openssl connect, I see no OK until I hit enter, and I see:

* OK Waiting for authentication process to respond..

And if I type "1 Login bob bobpass" now.. I get:

* OK Waiting for authentication process to respond..

So it's almost like the protocol has changed?? And this is why my Mac Mail app hangs when trying to connect to IMAP SSL port 993, because it's sending the "1 Login user pass" command and not getting what it expects.

Author:  sweh [ Sat Mar 23, 2013 4:49 pm ]
Post subject:  Re: How to get IMAP/SSL (993) working?

Sounds like you've not got SASL working properly; restart sasl daemons, maybe?

Author:  MDesigner [ Sun Mar 24, 2013 3:28 am ]
Post subject:  Re: How to get IMAP/SSL (993) working?

Got it. This guide works perfectly for Ubuntu 12.04:

http://www.exratione.com/2012/05/a-mail ... cot-mysql/

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/