2
Mails from Microsoft rejected / dropped
Problem reported by Josip Meglaj - 4/25/2023 at 4:36 AM
Not A Problem
Hello,

This was/is an ongoing problem at my SmarterMail Server. Client mentionned "missing mails". Means, he should have received E-Mails but has not, and the sender claims he sent it.

Therefore searched the SMTP Log, found "something", searched to the Message ID and then (the bottom part):

[2023.04.25] 09:17:14.622 [40.107.24.136][53331641] DMARC Results: Skipped (DMARC Disabled), Reason: Unknown, Reject? False
[2023.04.25] 09:17:14.622 [40.107.24.136][53331641] rsp: 250 OK
[2023.04.25] 09:17:14.622 [40.107.24.136][53331641] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.25] 09:17:14.622 [40.107.24.136][53331641] Received message size: 42437 bytes
[2023.04.25] 09:17:14.622 [40.107.24.136][53331641] Successfully wrote to the HDR file. (D:\SmarterMail\Spool\SubSpool18\6454266.hdr)
[2023.04.25] 09:17:14.622 [40.107.24.136][53331641] Data transfer succeeded, writing mail to 6454266.eml (MessageID: <GV0P278MB0338E79F06FF7B21ECFB73C9AB649@GV0P278MB0338.CHEP278.PROD.OUTLOOK.COM>)
[2023.04.25] 09:17:14.622 [40.107.24.136][53331641] Exception: (PooledTcpItem.cs) Von der Übertragungsverbindung können keine Daten gelesen werden: Eine vorhandene Verbindung wurde vom Remotehost geschlossen.
[2023.04.25] 09:17:14.622 [40.107.24.136][53331641] StackTrace:    bei System.Net.Sockets.NetworkStream.BeginRead(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state)
[2023.04.25] 09:19:15.078 [40.107.24.136][53331641] rsp: 421 Command timeout, closing transmission channel
[2023.04.25] 09:19:15.078 [40.107.24.136][53331641] disconnected at 25.04.2023 09:19:15

It seems that Microsofts SMTP Server disconnects and the E-Mail was not "finished".

Therefore I searched for "Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected."

The Results are only from Microsofts IP Range 40.107.24.0/24, 40.107.23.0/24, 52.100.2.0/24 and 52.100.1.0/24. Here the last 7 days:

[2023.04.17] 09:24:36.255 [40.107.24.63][35069214] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.17] 10:16:25.768 [40.107.24.112][64767937] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.17] 13:50:18.461 [40.107.23.90][26515522] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.19] 07:43:51.141 [40.107.24.43][17030088] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.19] 07:52:43.639 [40.107.24.46][43652700] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.19] 14:07:33.914 [40.107.24.130][56020509] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.19] 18:27:58.882 [40.107.24.73][21628878] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.20] 00:21:11.847 [52.100.1.241][39986758] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.20] 08:25:14.470 [40.107.24.114][43993999] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.20] 08:59:24.288 [40.107.24.72][15963444] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.20] 15:46:26.651 [40.107.24.96][26155781] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.20] 17:53:27.792 [52.100.2.208][39802602] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.21] 10:47:36.937 [40.107.24.98][4934190] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.21] 11:37:27.301 [40.107.24.85][18134796] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.21] 12:10:28.206 [40.107.24.67][58143801] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.21] 13:14:25.656 [40.107.24.40][54031661] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.21] 15:04:57.224 [40.107.24.58][63884756] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.21] 15:07:36.820 [40.107.24.79][1504136] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.23] 14:53:12.816 [40.107.23.135][56280256] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.24] 07:30:07.486 [40.107.24.114][48099766] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.24] 08:48:00.560 [40.107.24.51][52700856] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.24] 10:17:02.160 [40.107.24.72][12624182] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.24] 11:30:05.371 [40.107.24.115][25442757] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.24] 13:31:39.647 [40.107.23.110][35607709] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.24] 13:50:36.243 [40.107.24.48][21014551] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.24] 14:21:50.280 [40.107.24.135][10221818] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.24] 15:18:06.245 [40.107.23.73][31449577] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.24] 16:43:50.501 [40.107.24.42][29012478] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.25] 05:59:03.280 [40.107.24.63][4564460] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.
[2023.04.25] 09:17:14.622 [40.107.24.136][53331641] Client socket is disconnected! Disconnect exception encountered: False, IsDisconnected: True, This message will be rejected.


The bad part is, my SmarterMail Server receives most of the time e-mails from Microsoft 365 correct, but some E-Mails are dropped. Again - only from Microsofts IP Range.

Does anyone have similar problems? Or is this maybe a Switzerland only issue?

Thanks in advance,

Josip

2 Replies

Reply to Thread
1
Douglas Foster Replied
This has been discussed previously, but right now I cannot find the previous discussion.

This is a Microsoft bug, but since you will have little hope of changing them, you need to activate the setting in System Settings... Protocol... SMTP In... "Continue delivery if session is disconnected by client."

Details:
After sending the DATA portion of a message, the submitting server is supposed to wait for an accept or reject response.   The receiver may need to do a bunch of work to decide whether the message is valid or not, so RFC 5321 specifies a big timeout - I think 10 minutes.   If the sender never receives a response, the sender should assume a temporary failure occurred, and retry the message until it receives an accept or reject, or a retry limit is reached (RFC 5321 says four days.)

Therefore, if the receiving system sees an early disconnect, the receiving system should assume that a temporary error occurred and the sending system will retry.

On a seemingly random basis, Microsoft servers will deliver and quit without waiting for an acknowledgement, yet assume successful delivery.   So your server assumes they will retry but their server assumes that it was delivered, so the message is lost.

With the option configured as I suggested, an early disconnect will be delivered.   If the submitting server is configured properly, the disconnected message will be delivered and the retry will be delivered.   But at least you will not have Microsoft messages lost.

I think the problem is specific to individual servers out of the 1000s that Microsopft operates.   But to solve the problem, you will need you Microsoft-based correspondent to be willing to open a ticket with Microsoft and nag them to completion.   I tried with a couple of correspondents, but without success.   I think one never opened a ticket, and the other gave up when Microsoft declared that it was obviously a problem with my system.
0
Zach Sylvester Replied
Employee Post
Hey Douglas and Josip,

This is the thread that you're thinking of Doug https://portal.smartertools.com/community/a94714/watch-out-client-socket-is-disconnected-disconnect-exception-occurred-false-isdisconnected.aspx
And yeah Microsoft is the worst to work with. Every time I open a ticket with them they are never able to answer my questions or do anything about my problems.  

Thanks, 
Zach Sylvester Software Developer SmarterTools Inc. www.smartertools.com

Reply to Thread