Hi!

I'm having a very strange problem while trying to make a wrapper around my
SMTP server.

I'm sending an e-mail from Outlook Express (version 5) to a server with SSL
enabled (port 465). On the server side I've got stunnel that goes on another
host to port 25. Now the Outlook tries to establish connection, and after a
short while comes up with:

A secure connection to the server could not be established. Account:
'dimrub@genghis,SSL', Server: 'genghis', Protocol: SMTP, Port: 465,
Secure(SSL): Yes, Error Number: 0x800CCC1A

The error code is a very generic one (something like 'Unable to connect
using SSL'). Here's output of stunnel:

LOG7[7941:6145]: unity.ex.25 started
LOG5[7941:6145]: unity.ex.25 connected from 89.119.40.159:3435
LOG7[7941:6145]: unity.ex.25 connecting 89.119.41.3:25
LOG7[7941:6145]: Remote host connected
LOG7[7941:6145]: before SSL initalisation
LOG7[7941:6145]: before SSL initalisation
LOG7[7941:6145]: SSLv3 read client hello A
LOG7[7941:6145]: SSLv3 write server hello A
LOG7[7941:6145]: SSLv3 write certificate A
LOG7[7941:6145]: SSLv3 write server done A
LOG7[7941:6145]: SSLv3 flush data
LOG7[7941:6145]: SSLv3 read client key exchange A
LOG7[7941:6145]: SSLv3 read finished A
LOG7[7941:6145]: SSLv3 write change cipher spec A
LOG7[7941:6145]: SSLv3 write finished A
LOG7[7941:6145]: SSLv3 flush data
LOG7[7941:6145]: SSL negotiation finished successfully
LOG7[7941:6145]:    3 items in the session cache
LOG7[7941:6145]:    0 client connects (SSL_connect())
LOG7[7941:6145]:    0 client connects that finished
LOG7[7941:6145]:    6 server connects (SSL_accept())
LOG7[7941:6145]:    6 server connects that finished
LOG7[7941:6145]:    3 session cache hits
LOG7[7941:6145]:    0 session cache misses
LOG7[7941:6145]:    0 session cache timeouts
LOG7[7941:6145]: SSL negotiation finished successfully
LOG6[7941:6145]: unity.ex.25 opened with TLSv1, cipher EXP-RC4-MD5 (128
bits)
LOG7[7941:6145]: Sockets set to non-blocking mode
LOG7[7941:6145]: SSL closed on read
LOG5[7941:6145]: Connection closed: 101 bytes sent to SSL, 0 bytes sent to
socket
LOG7[7941:6145]: unity.ex.25 finished (0 left)

We see that the negotiation was completed successfully, and then Outlook
just goes and closes the connection for no good reason.

Now the strange part comes: I close Outlook and on exit it asks me whether I
want to try and send the remaining message. OK, I do. So it tries and...
succeeds. Here's the output of this session:

LOG7[7950:7169]: unity.ex.25 started
LOG5[7950:7169]: unity.ex.25 connected from 89.119.40.159:3441
LOG7[7950:7169]: unity.ex.25 connecting 89.119.41.3:25
LOG7[7950:7169]: Remote host connected
LOG7[7950:7169]: before SSL initalisation
LOG7[7950:7169]: before SSL initalisation
LOG7[7950:7169]: SSLv3 read client hello A
LOG7[7950:7169]: SSLv3 write server hello A
LOG7[7950:7169]: SSLv3 write certificate A
LOG7[7950:7169]: SSLv3 write server done A
LOG7[7950:7169]: SSLv3 flush data
LOG7[7950:7169]: SSLv3 read client key exchange A
LOG7[7950:7169]: SSLv3 read finished A
LOG7[7950:7169]: SSLv3 write change cipher spec A
LOG7[7950:7169]: SSLv3 write finished A
LOG7[7950:7169]: SSLv3 flush data
LOG7[7950:7169]: SSL negotiation finished successfully
LOG7[7950:7169]:    4 items in the session cache
LOG7[7950:7169]:    0 client connects (SSL_connect())
LOG7[7950:7169]:    0 client connects that finished
LOG7[7950:7169]:    7 server connects (SSL_accept())
LOG7[7950:7169]:    7 server connects that finished
LOG7[7950:7169]:    3 session cache hits
LOG7[7950:7169]:    0 session cache misses
LOG7[7950:7169]:    0 session cache timeouts
LOG7[7950:7169]: SSL negotiation finished successfully
LOG6[7950:7169]: unity.ex.25 opened with TLSv1, cipher EXP-RC4-MD5 (128
bits)
LOG7[7950:7169]: Sockets set to non-blocking mode
LOG7[7950:7169]: SSL closed on read
LOG5[7950:7169]: Connection closed: 263 bytes sent to SSL, 562 bytes sent to
soc
ket
LOG7[7950:7169]: unity.ex.25 finished (0 left)

What's different? I have no idea. Has anyone encountered this (or similar)
problem? I'd appreciate any pointer to what's wrong.

--
Dmitry Rubinstein 
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to