<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" id="owaParaStyle" style="display: none;">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body dir="ltr" fpstyle="1" aria-label="Corps du message" tabindex="0">
<div name="divtagdefaultwrapper" id="divtagdefaultwrapper" style="font-family: Calibri,Arial,Helvetica,sans-serif; font-size: 12pt; color: #000000; margin: 0">
Hi,
<div><br>
</div>
<div>Since our company had to migrate to Orange Office365 platform, we cannot send simple SMTP message using
<b>smtp.office365.com</b></div>
<div><br>
</div>
<div>We have to use SMTP over TLS.</div>
<div><br>
</div>
<div>While I have to use some applications which cannot use SMTP, I installed and setup STunnel.</div>
<div><br>
</div>
<div>When I try to send a simple mail like this :</div>
<div><font face="Courier New, monospace" size="2">telnet myserver 25</font></div>
<div><font face="Courier New, monospace" size="2">ehlo ch-lepuy.fr</font></div>
<div><font face="Courier New, monospace" size="2">mail from: toto@ch-lepuy.fr</font></div>
<div><br>
</div>
<div>I cannot continue with rcpt to syntax and I have the following message :</div>
<div><font face="Courier New, monospace" size="2">rcpt to:530 5.7.1 Client was not authenticated</font></div>
<div><br>
</div>
<div>In the STunnel log file, I can see that :</div>
<div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:20:49 LOG7[1352:2832]: SSL state (connect): before/connect initialization</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:20:49 LOG7[1352:2832]: SSL state (connect): SSLv3 write client hello A</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:20:50 LOG7[1352:2832]: SSL state (connect): SSLv3 read server hello A</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:20:50 LOG7[1352:2832]: SSL state (connect): SSLv3 read server certificate A</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:20:50 LOG7[1352:2832]: SSL state (connect): SSLv3 read server key exchange A</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:20:50 LOG7[1352:2832]: SSL state (connect): SSLv3 read server certificate request A</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:20:50 LOG7[1352:2832]: SSL state (connect): SSLv3 read server done A</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:20:50 LOG7[1352:2832]: SSL state (connect): SSLv3 write client certificate A</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:20:50 LOG7[1352:2832]: SSL state (connect): SSLv3 write client key exchange A</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:20:50 LOG7[1352:2832]: SSL state (connect): SSLv3 write certificate verify A</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:20:50 LOG7[1352:2832]: SSL state (connect): SSLv3 write change cipher spec A</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:20:50 LOG7[1352:2832]: SSL state (connect): SSLv3 write finished A</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:20:50 LOG7[1352:2832]: SSL state (connect): SSLv3 flush data</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:20:50 LOG7[1352:2832]: SSL state (connect): SSLv3 read finished A</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:20:50 LOG7[1352:2832]: 1 items in the session cache</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:20:50 LOG7[1352:2832]: 1 client connects (SSL_connect())</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:20:50 LOG7[1352:2832]: 1 client connects that finished</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:20:50 LOG7[1352:2832]: 0 client renegotiations requested</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:20:50 LOG7[1352:2832]: 0 server connects (SSL_accept())</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:20:50 LOG7[1352:2832]: 0 server connects that finished</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:20:50 LOG7[1352:2832]: 0 server renegotiations requested</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:20:50 LOG7[1352:2832]: 0 session cache hits</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:20:50 LOG7[1352:2832]: 0 external session cache hits</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:20:50 LOG7[1352:2832]: 0 session cache misses</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:20:50 LOG7[1352:2832]: 0 session cache timeouts</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:20:50 LOG7[1352:2832]: Peer certificate was cached (6184 bytes)</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:20:50 LOG6[1352:2832]: SSL connected: new session negotiated</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:20:50 LOG6[1352:2832]: Negotiated TLSv1/SSLv3 ciphersuite: ECDHE-RSA-AES256-SHA (256-bit encryption)</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:20:50 LOG6[1352:2832]: Compression: null, expansion: null</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:21:13 LOG3[1352:2832]: SSL_read: Connection reset by peer (WSAECONNRESET) (10054)</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:21:13 LOG5[1352:2832]: Connection reset: 65 byte(s) sent to SSL, 231 byte(s) sent to socket</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:21:13 LOG7[1352:2832]: Remote socket (FD=316) closed</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:21:13 LOG7[1352:2832]: Local socket (FD=244) closed</font></div>
<div><font face="Courier New, monospace" size="2">2013.08.06 19:21:13 LOG7[1352:2832]: Service [SMTP Outgoing] finished (0 left)</font></div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Here is my STunnel setup :</div>
<div>
<div><font face="Courier New, monospace" size="2">client = yes</font></div>
<div><font face="Courier New, monospace" size="2">output = stunnel-log.txt</font></div>
<div><font face="Courier New, monospace" size="2">debug = 7</font></div>
<div><font face="Courier New, monospace" size="2">taskbar = yes</font></div>
<div><font face="Courier New, monospace" size="2"><br>
</font></div>
<div><font face="Courier New, monospace" size="2">; Disable FIPS mode to allow non-approved protocols and algorithms</font></div>
<div><font face="Courier New, monospace" size="2">;fips = no</font></div>
<div><font face="Courier New, monospace" size="2"><br>
</font></div>
<div><font face="Courier New, monospace" size="2">; **************************************************************************</font></div>
<div><font face="Courier New, monospace" size="2">; * Service defaults may also be specified in individual service sections *</font></div>
<div><font face="Courier New, monospace" size="2">; **************************************************************************</font></div>
<div><font face="Courier New, monospace" size="2"><br>
</font></div>
<div><font face="Courier New, monospace" size="2">; Certificate/key is needed in server mode and optional in client mode</font></div>
<div><font face="Courier New, monospace" size="2">cert = stunnel.pem</font></div>
<div><font face="Courier New, monospace" size="2"><br>
</font></div>
<div><font face="Courier New, monospace" size="2">; Disable support for insecure SSLv2 protocol</font></div>
<div><font face="Courier New, monospace" size="2">options = NO_SSLv2</font></div>
<div><font face="Courier New, monospace" size="2"><br>
</font></div>
<div><font face="Courier New, monospace" size="2">[SMTP Outgoing]</font></div>
<div><font face="Courier New, monospace" size="2">protocol = smtp</font></div>
<div><font face="Courier New, monospace" size="2">accept = 25</font></div>
<div><font face="Courier New, monospace" size="2">connect = smtp.office365.com:587</font></div>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Does anyone have an idea ?</div>
<div><br>
</div>
<div>Regards?<br>
<div><br>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<b><font color="3366FF">Patrice Oliver<font color="000000"> | </font><font color="993300">Centre Hospitalier Emile Roux</font></font></b><br>
<b>Responsable Informatique</b><br>
T. 04 71 04 38 30<br>
<br>
12 Bd André Chantemesse - 43012 LE PUY EN VELAY Cedex<b><br>
</b><font color="FF0000"><a target="_blank" href="http://www.ch-lepuy.fr" tabindex="0">http://www.ch-lepuy.fr</a></font><br>
<font face="Verdana" size="1"><br>
</font><br>
</div>
</div>
</div>
</div>
</body>
</html>