Tuesday, February 12, 2008

Problem in sending secured email using outlook express

Scenario:
1) You have setup outlook express (OE) to use secure connection (SSL) while sending messages (SMTP)
2) Your email server is other than Microsoft Exchange
3) You are using a non-standard SMTP port
4) You get following exception:

Your server has unexpectedly terminated the connection. Possible causes for this include server problems, network problems, or a long period of inactivity. Account: a.b.c.d', Server: x.y.z.p', Protocol: SMTP, Port: 2025, Secure(SSL): Yes, Error Number: 0x800CCC0F

This happens because outlook express when doing SMTP over a non standard port tries to establish TLS session before starting SMTP session. The standard behaviour is first to start SMTP session and then negotiate opening of TLS session.

Please note that Outlook does not have this problem. It can successfully send secured emails on standard as well as non-standard SMTP ports.

We encountered this while using Postfix SMTP server listening at a non standard SMTP port.

Changing the SMTP port to 25 on email server will fix the problem.

Other way to fix this is to check whether your email server supports this non-standard (TLS first followed by SMTP) behavior. In case of Postfix this is supported by configuring another port which will just work for this non-standard behavior. All you subscribers using OE will have to use a port which is different from subscribers using non-OE clients.

No comments: