1

My corporate email is hosted by Office365. I think KMail is far more productive an email client than the Outlook Web Application (OWA), so I use IMAP to receive email and SMTP to send email.

I can receive email fine, but on certain networks I cannot send mail. For example, GoGo Inflight Internet (gogoair) or some of the corporate networks of my clients. On these networks, I get the following error from KMail:

Failed to transport message. smtp.office365.com: Socket operation timed out

Sending email to Gmail via SMTP through the same port (587) works fine.

I have configured KMail to send email as follows: Outgoing mail server: smtp.office365.com Port: 587 Encryption: TLS

I have tried:

  • Lengthening the socket timeout
  • Disabling IPV6
  • Disabling TCP Timestamps

but I see no change in behavior.

I don't see anything relevant in the journal, akonadi logs, or .xsession-errors

Anyone have a suggestion on what else I can try?

  • 1
    I'm voting to close this question as off-topic because having a port blocked in some networks is not a Unix problem. – Rui F Ribeiro Nov 21 '16 at 9:40
  • As I noted in the question, it is not a blocked port. I can send to the same port through Gmail. – resplin Nov 21 '16 at 9:55
  • 1
    Can you connect at all? openssl s_client -starttls smtp -connect smtp.office365.com:587 – phg Nov 21 '16 at 10:26
  • I would recommend asking Microsoft then. – Rui F Ribeiro Nov 21 '16 at 12:05
  • Microsoft says that KMail is not a supported SMTP client. <grumble> – resplin Nov 21 '16 at 13:04
1

You can verify connectivity to STARTTLS enabled services using the apps that ship with OpenSSL:

$ openssl s_client -starttls smtp -connect smtp.office365.com:587

If this succeeds, it will dump extensive information about the servers’s SSL configuration and the handshake to the terminal. You should then be able to talk to the server using ordinary SMTP (send it an EHLO for example).

Otherwise you get either a connection error or a timeout.

In case of smtp.office365.com the handshake is successful from here.

For more protocols supported with the -starttls parameter see the OpenSSL documentation: https://www.openssl.org/docs/man1.0.2/apps/s_client.html

  • Thanks for the help phg! I should have thought to test the connectivity with OpenSSL before blaming KMail. – resplin Nov 21 '16 at 21:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.