In postfix and dovecot i am only able to connect to ports 25 (SMTP), 110 (POP3) and 143 (IMAP), others such as 465 (SMTPS), 587 (SMTP TLS), 993 (IMAPS) and 995 (POP3S) i am unable to connect with mail clients (used roundcubemail and mail app).

I have also test with telnet at localhost, and those ports was not open, except 587.

It seems obvious that i am having a problem with SSL and TLS but i cannot figure out how can i solve this with OpenSSL that came by default at Server App 3 (I am using also OSX 10.9.5).

main.cf: http://pastebin.com/aEtC0AJt

doveconf -n: http://pastebin.com/bB2nacy8


I discover that i had to use,

openssl s_client -connect :

to connect to IMAPS and POP3S ports, and with 587 i can connect but it shows this error after and closes:

CONNECTED(00000003) 21821:error:140770FC:SSL routines:SSL23_X_HELLO:unknown protocol:/SourceCache/OpenSSL098/OpenSSL098-52.8.4/src/ssl/s23_clnt.c:618:

I can also connect to HTTPS port and use it without problem.

It is my first time using certificates and seems a bit confuse for someone who have never used this before.


  • Did you enable imaps on Dovecot Configuration?Check with netstat -ltap command.
    – supriady
    Commented Feb 1, 2017 at 10:10

1 Answer 1


for postfix you have to enable smtps service in master.cf:

smtps     inet  n       -       n       -       -       smtpd
  -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
  -o milter_macro_daemon_name=ORIGINATING

and then restart postfix. That should open port 465.

In dovecot your pastebin listing shows ssl = no on line 163 - change it to yes. You will also need ssl_cert= and ssl_key= settings added to point to your certificate. Then restart dovecot. That should open ports 993 and 995.

There may be more problems after you've done with the above changes but lets tackle one issue at a time.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .