The setup is Pegasus sending mail using SMTP and START TLS, and Mercury S receiving it. Sender and receiver are on different different ISPs. Most of the time this works perfectly.
Once in a while, the sender's internet connection becomes heavily congested (too many YouTube users) and 'ping' response times from the sender PC to its nearest ISP router are 3000 milliseconds or more (normally it's 3-5 milliseconds).
When this kind of congestion is happening, Mercury S consistently times out on receiving. TCP timeout for Pegasus and Mercury S is set to 90 seconds, and yet the TCP log for Mercury S shows an error after only 6 seconds. If I disable START TLS on the sender (Pegasus), email flows without error, so there seems to be a problem with how the Mercury SSL code handles timeouts.
Below are the first three lines and the tail ends of the Mercury and Pegasus Session logs. The first few lines show that the sender and receiver clocks are in synch, so the times at the tail end are meaningful. You can see Mercury gave up way before 90 seconds had elapsed, and that some packets were taking about 3 seconds to travel between sender and receiver (the '354 OK' line was received by Pegasus 3 seconds after it was sent) . Actual IP addresses have been changed.
Mercury S log:
15:47:47.282: Connection from 999.999.210.200, Wed Aug 05 15:47:47 2009<lf>
15:47:47.282: << 220-mail.receiver.com ESMTP server ready.<cr><lf>220-Use of this server for unauthorised relaying of mail is forbidden.<cr><lf>
15:47:50.625: >> EHLO cedar.sender.com<cr><lf>
[stuff deleted]
15:48:08.511: << 235 Authentication successful.<cr><lf>
15:48:10.235: >> MAIL FROM:<subelman@sender.com.com><cr><lf>
15:48:10.235: << 250 Sender OK - send RCPTs.<cr><lf>
15:48:14.559: >> RCPT TO:<subelman@receiver.com><cr><lf>
15:48:14.559: << 250 Recipient OK - send RCPT or DATA.<cr><lf>
15:48:17.125: >> DATA<cr><lf>
15:48:17.125: << 354 OK, send data, end with CRLF.CRLF<cr><lf>
15:48:23.083: 18: SSL read error -25 (locus 0, type 0, code 0, 'Timeout on read (select()) after 1 secon')
15:48:24.514: --- Connection closed normally at Wed Aug 05 15:48:24 2009. ---
15:48:24.514:
Pegasus Log:
15:47:47.421 [*] Connection established to 000.000.145.173
15:47:50.781 >> 0045 220-mail.receiver.com ESMTP server ready.\0D\0A
15:47:50.781 >> 0072 220-Use of this server for unauthorised relaying of mail is forbidden.\0D\0A
15:47:50.781 << 0023 EHLO cedar.sender.com\0D\0A
[Stuff deleted]
15:48:10.375 >> 0032 235 Authentication successful.\0D\0A
15:48:10.375 << 0037 MAIL FROM:<subelman@sender.com>\0D\0A
15:48:14.703 >> 0029 250 Sender OK - send RCPTs.\0D\0A
15:48:14.703 << 0031 RCPT TO:<subelman@receiver.com>\0D\0A
15:48:17.265 >> 0039 250 Recipient OK - send RCPT or DATA.\0D\0A
15:48:17.265 << 0006 DATA\0D\0A
15:48:20.656 >> 0039 354 OK, send data, end with CRLF.CRLF\0D\0A
15:48:20.656 << 0052 From: "Eduardo Subelman" <subelman@sender.com>\0D\0A
15:48:20.656 << 0052 Organization: No organization at all..\0D\0A
[about 500 more lines of email body deleted from here]
15:48:20.656 << 0020 <div align="left">\0D\0A
15:48:20.656 << 0014 </div>\0D\0A
15:48:20.656 << 0009 </body>\0D\0A
15:48:20.656 << 0009 </html>\0D\0A
15:48:20.656 << 0003 .\0D\0A
15:48:26.187 24: SSL flush error -42 (locus 0, type 0, code 10054, 'WSAECONNRESET: Connection was reset by the remote host executing a close')
15:48:26.187 18: SSL read error -42 (locus 0, type 0, code 10054, 'WSAECONNRESET: Connection was reset by the remote host executing a close')
15:48:28.406 << 0006 QUIT\0D\0A
15:48:28.406 19: SSL write error -42 (locus 0, type 0, code 10054, 'WSAECONNRESET: Connection was reset by the remote host executing a close')
<p>The setup is Pegasus sending mail using SMTP and START TLS, and Mercury S receiving it. Sender and receiver are on different different ISPs. Most of the time this works perfectly.</p><p>Once in a while, the sender's internet connection becomes heavily congested (too many YouTube users) and 'ping' response times from the sender PC to its nearest ISP router are 3000 milliseconds or more (normally it's 3-5 milliseconds).</p><p>When this kind of congestion is happening, Mercury S consistently times out on receiving. TCP timeout for Pegasus and Mercury S is set to 90 seconds, and yet the TCP log for Mercury S shows an error after only 6 seconds. If I disable START TLS on the sender (Pegasus), email flows without error, so there seems to be a problem with how the Mercury SSL code handles timeouts.</p><p>Below are the first three lines and the tail ends of the Mercury and Pegasus Session logs. The first few lines show that the sender and receiver clocks are in synch, so the times at the tail end are meaningful. You can see Mercury gave up way before 90 seconds had elapsed, and that some packets were taking about 3 seconds to travel between sender and receiver (the '354 OK' line was received by Pegasus 3 seconds after it was sent) . Actual IP addresses have been changed.
</p><p>Mercury S log:
</p><p>15:47:47.282: Connection from 999.999.210.200, Wed Aug 05 15:47:47 2009&lt;lf&gt;
15:47:47.282: &lt;&lt; 220-mail.receiver.com ESMTP server ready.&lt;cr&gt;&lt;lf&gt;220-Use of this server for unauthorised relaying of mail is forbidden.&lt;cr&gt;&lt;lf&gt;
15:47:50.625: &gt;&gt; EHLO cedar.sender.com&lt;cr&gt;&lt;lf&gt;</p><p>[stuff deleted]
</p><p>15:48:08.511: &lt;&lt; 235 Authentication successful.&lt;cr&gt;&lt;lf&gt;
15:48:10.235: &gt;&gt; MAIL FROM:&lt;subelman@sender.com.com&gt;&lt;cr&gt;&lt;lf&gt;
15:48:10.235: &lt;&lt; 250 Sender OK - send RCPTs.&lt;cr&gt;&lt;lf&gt;
15:48:14.559: &gt;&gt; RCPT TO:&lt;subelman@receiver.com&gt;&lt;cr&gt;&lt;lf&gt;
15:48:14.559: &lt;&lt; 250 Recipient OK - send RCPT or DATA.&lt;cr&gt;&lt;lf&gt;
15:48:17.125: &gt;&gt; DATA&lt;cr&gt;&lt;lf&gt;
15:48:17.125: &lt;&lt; 354 OK, send data, end with CRLF.CRLF&lt;cr&gt;&lt;lf&gt;
15:48:23.083: 18: SSL read error -25 (locus 0, type 0, code 0, 'Timeout on read (select()) after 1 secon')
15:48:24.514: --- Connection closed normally at Wed Aug 05 15:48:24 2009. ---
15:48:24.514:
</p>Pegasus Log:
<p>15:47:47.421 [*] Connection established to 000.000.145.173
15:47:50.781 &gt;&gt; 0045 220-mail.receiver.com ESMTP server ready.\0D\0A
15:47:50.781 &gt;&gt; 0072 220-Use of this server for unauthorised relaying of mail is forbidden.\0D\0A
15:47:50.781 &lt;&lt; 0023 EHLO cedar.sender.com\0D\0A</p><p>[Stuff deleted]
</p><p>&nbsp;15:48:10.375 &gt;&gt; 0032 235 Authentication successful.\0D\0A
15:48:10.375 &lt;&lt; 0037 MAIL FROM:&lt;subelman@sender.com&gt;\0D\0A
15:48:14.703 &gt;&gt; 0029 250 Sender OK - send RCPTs.\0D\0A
15:48:14.703 &lt;&lt; 0031 RCPT TO:&lt;subelman@receiver.com&gt;\0D\0A
15:48:17.265 &gt;&gt; 0039 250 Recipient OK - send RCPT or DATA.\0D\0A
15:48:17.265 &lt;&lt; 0006 DATA\0D\0A
15:48:20.656 &gt;&gt; 0039 354 OK, send data, end with CRLF.CRLF\0D\0A
15:48:20.656 &lt;&lt; 0052 From: "Eduardo Subelman" &lt;subelman@sender.com&gt;\0D\0A
15:48:20.656 &lt;&lt; 0052 Organization: No organization at all..\0D\0A
&nbsp; [about 500 more lines of email body deleted from here]
15:48:20.656 &lt;&lt; 0020 &lt;div align="left"&gt;\0D\0A
15:48:20.656 &lt;&lt; 0014 &amp;nbsp;&lt;/div&gt;\0D\0A
15:48:20.656 &lt;&lt; 0009 &lt;/body&gt;\0D\0A
15:48:20.656 &lt;&lt; 0009 &lt;/html&gt;\0D\0A
15:48:20.656 &lt;&lt; 0003 .\0D\0A
15:48:26.187 24: SSL flush error -42 (locus 0, type 0, code 10054, 'WSAECONNRESET: Connection was reset by the remote host executing a close')
15:48:26.187 18: SSL read error -42 (locus 0, type 0, code 10054, 'WSAECONNRESET: Connection was reset by the remote host executing a close')
15:48:28.406 &lt;&lt; 0006 QUIT\0D\0A
15:48:28.406 19: SSL write error -42 (locus 0, type 0, code 10054, 'WSAECONNRESET: Connection was reset by the remote host executing a close')</p><p>&nbsp;</p>