Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sat Mar 23, 2013 5:43 am 
Offline
Senior Newbie

Joined: Sat Mar 23, 2013 4:20 am
Posts: 7
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.


Top
   
PostPosted: Sat Mar 23, 2013 1:41 pm 
Offline
Senior Newbie

Joined: Sat Mar 23, 2013 4:20 am
Posts: 7
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.


Top
   
PostPosted: Sat Mar 23, 2013 2:40 pm 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
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)

_________________
Rgds
Stephen
(Linux user since kernel version 0.11)


Top
   
PostPosted: Sat Mar 23, 2013 3:00 pm 
Offline
Senior Newbie

Joined: Sat Mar 23, 2013 4:20 am
Posts: 7
That is an invalid setting. This is dovecot v2 on Ubuntu 12.04 LTS.


Top
   
PostPosted: Sat Mar 23, 2013 3:21 pm 
Offline
Senior Newbie

Joined: Sat Mar 23, 2013 4:20 am
Posts: 7
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.


Top
   
PostPosted: Sat Mar 23, 2013 4:49 pm 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
Sounds like you've not got SASL working properly; restart sasl daemons, maybe?

_________________
Rgds

Stephen

(Linux user since kernel version 0.11)


Top
   
PostPosted: Sun Mar 24, 2013 3:28 am 
Offline
Senior Newbie

Joined: Sat Mar 23, 2013 4:20 am
Posts: 7
Got it. This guide works perfectly for Ubuntu 12.04:

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


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group