Cannot get Mailserver to work on port 587

Issue #549 resolved
Tim Reeves created an issue

I am using a self-compiled binary from the current master, i.e. 5.21, on Debian 8.7.

All my servers are managed via Plesk Onyx with HTTP/2 switched on, and own ciphers specified:

ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-    RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DSS:!DES:!RC4:!3DES:!MD5:!PSK

Previously I was using the 5.9 binary from the (outdated) Debian package. But with that, I had no problem with port 587 for the mailserver, it just worked. Now the semantics of the mailserver statement have changed a bit, and I have adapted my config to match - but no joy.

This WORKS:

set mailserver <uri> port 465 username "bla@blup.com" password "hidden" using ssl

This FAILS:

set mailserver <uri> port 587 username "bla@blup.com" password "hidden" using ssl

This FAILS:

set mailserver <uri> port 587 username "bla@blup.com" password "hidden" using ssl { version: tlsv12 }

The log shows:

[CET Feb 16 23:59:50] error    : Cannot create socket to [bla@blup.com]:587 -- SSL connection error: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
[CET Feb 16 23:59:50] error    : Cannot open a connection to the mailserver bla@blup.com:587 -- Success
[CET Feb 16 23:59:50] error    : Mail: Delivery failed -- no mail server is available

In fact I have also configured a fallback server (both of them Ubuntu 14.04), same problem with both.

Thanks for Monit - a great product!

Tim Reeves

Comments (4)

  1. Tildeslash repo owner

    Hello Tim,

    thank you for report, we have reproduced the problem, it should be fixed now - please can you fetch monit master and confirm it it works for you?

    Best regards, The Monit team

  2. Tim Reeves reporter

    Hallo Monit team,

    many thanks for the prompt fix - I can confirm that port 587 now works.

    Best regards and again many thanks,

    Tim

  3. Log in to comment