Opened 15 months ago
Last modified 14 months ago
#18579 new bug
General OS error while establishing a connection with iCloud SMTP — at Initial Version
Reported by: | Nexus-6 | Owned by: | axeld |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Servers/mail_daemon | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
I already investigated this issue in the past to no avail, until yesterday. The symptom is that attempting to connect to smtp.mail.me.com results in a connection error. More specifically, iCloud SMTP should be listening to port 587 (TLS). Either configuring in the Outgoing panel smtp.mail.me.com with SSL or smtp.mail.me.com:587 alway result in a cryptic General OS error showed by the mail daemon log windows. Digging in the SMTP outbound SMTP addon, the problem seems to be in the call to status_t SMTPProtocol::Open(const char *address, int port, bool esmtp) and more specifically in fSocket->Connect(addr).
I have reproduced the code above in an isolated simple console application and the result is the same, unless at some point by trying all sorts of combinations of ports, it connected and trying to send an email worked! Until I rebooted. This time I had to do some additional voodoo, after succesfully trying to connect with this small test app I had to restart the mail_demon. The voodoo, although I'm not certain of what the sequence exactly is and what triggers this behaviour, consists of a ping to the address of the smtp server and an attempt to connect via terminal with openssl s_client -connect smtp.mail.me.com:587 -crlf or openssl s_client -connect smtp.mail.me.com:587 -crlf
I should add that neither openssl consistently connects. No other SMTP server I have tried has this issue, but I have not tried a single one with the triple dot in the hostname. It maight sound silly but this is the only difference I can see, considering we barely are the transport layer.
Old syslog for comparison