I am running Dovecot 2.2.15 on Slackware64 14.1, kernel 3.10.17, openssl 1.0.2.
I can connect from my Android to this server just fine using IMAP and no security. Now I am trying to set up SSL security. On the Android I've tried both "SSL" and "SSL (Accept all certificates)". The suggested port is 993 which I've forwarded on the server to port 143. When I attempt to connect I get the following message on the Android:
Setup could not finish
Cannot safely connect to server.
(SSL handshake aborted : ssl=0x5fb440: Failure in SSL library, usually a protocol error
error:140770FC:SSL routines: SSL23_GET_SERVER_HELLO: unknown protocol (external/openssl/ss/s23_clnt.c:683 oxad1276bf:0x0000000000))
In my dovecot log I get the following:
Feb 28 12:21:52 auth: Debug: Loading modules from directory: /usr/local/lib/dovecot/auth
Feb 28 12:21:52 auth: Debug: Read auth token secret from /usr/local/var/run/dovecot/auth-token-secret.dat
Feb 28 12:21:52 auth: Debug: auth client connected (pid=22360)
Feb 28 12:24:52 imap-login: Info: Disconnected: Inactivity (no auth attempts in 180 secs): user=<>, rip=18.104.22.168, lip=22.214.171.124, session=<aGRJQykQOwBMtUHE>
Feb 28 12:25:18 imap(mark): Info: Disconnected for inactivity in=1325 out=124104
My dovecot config is:
$ doveconf -n
# 2.2.15: /usr/local/etc/dovecot/dovecot.conf
# OS: Linux 3.10.17 x86_64 Slackware 14.1
auth_debug_passwords = yes
auth_mechanisms = plain login
auth_verbose = yes
auth_verbose_passwords = plain
disable_plaintext_auth = no
info_log_path = /var/log/dovecot_info
mail_location = maildir:~/Maildir
driver = shadow
protocols = imap
ssl = no
driver = passwd
If I try connecting using TLS I get a message on the Android" "Setup could not finish/Server doesn't support TLS", but of course it does. We get and send messages with TLS all the time.
No idea what's wrong. Need help getting this working.