haraka / Haraka

A fast, highly extensible, and event driven SMTP server
https://haraka.github.io
MIT License
5.09k stars 662 forks source link

CRIT errors in tls.js if STARTTLS fails #1664

Closed typingArtist closed 8 years ago

typingArtist commented 8 years ago

Testing a Haraka server’s TLS setup with testssl.sh. Many of the connection attempts are not closed properly and create CRIT error messages in the log. These log entries are created after a timeout (in my case, about 30 seconds) after the actual connection attempt. Additionally, terminating the Haraka server while the timeout is still running, requires two ^C instead of one.

A typical error message is as follows:

[CRIT] [244A4B1A-82F7-4D96-9549-85A6ED444C69] [core] Plugin tls timed out on hook unrecognized_command - make sure it calls the callback

From the code it looks like the connection, although disconnected, is still stale as the plugin hook mechanism has to wait for the tls plugin to call the callback for the unrecognized_command hook. The logged timeout is actually the plugin manager’s generic timeout, not the tls plugin timeout.

msimerson commented 8 years ago

fixed by #1665