1
Phantom outbound emails in queue tying up the delivery thread
Problem reported by Scot Desort - 4/19/2017 at 7:17 AM
Submitted
We are running SM 13.5. A bot filled out a form on a web server of ours and submitted a thousand emails to random qq.com email addresses.
 
I went into the spool in the webgui and deleted all of these messages. However, the system is still attempting to delivery a few of these messages and it's caught in a loop of some kind. Sometimes a message shows in the delivery log like this:
 
2017.04.19] 09:06:12 [20473] Exception: Could not find file 'c:\SmarterMail\Spool\SubSpool2\124920473.eml'.
[2017.04.19]    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
[2017.04.19]    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
[2017.04.19]    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
[2017.04.19]    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
[2017.04.19]    at RelayServer.Clients.SMTP.SmtpClientSession.SendData()
[2017.04.19]    at RelayServer.Clients.SMTP.SmtpClientSession.#OI()
[2017.04.19]    at RelayServer.Clients.SMTP.SmtpClientSession.StartProcessing()
[2017.04.19] 09:06:12 [20473] CMD: QUIT
 
This message is indeed NOT in the spool in the gui. I have stopped and started the DELIVERY service and SMTP service from the gui to no avail.
 
Sometimes it tries to send one of the messages and it gets caught in a loop and ties up the thread, never really re-queuing the email and moving onto the next one... it just keeps looping. As a result, valid messages waiting for outbound delivery are building up with a status of REMOTE DELIVERY with no attempts. Here is a redacted portion of the DELIVERY log showing the loop:
 
[2017.04.19] 09:01:31 [20048] Sending remote mail for no-reply@somedomain.com
[2017.04.19] 09:01:31 [20048] Initiating connection to x.x.x.x
[2017.04.19] 09:01:31 [20048] Connecting to x.x.x.x:25 (Id: 1)
[2017.04.19] 09:01:31 [20048] Binding to local IP z.z.z.z:0 (Id: 1)
[2017.04.19] 09:01:31 [20048] Connection to x.x.x.x:25 from z.z.z.z:62316 succeeded (Id: 1)
[2017.04.19] 09:01:32 [20048] RSP: 220 newmx40.qq.com MX QQ Mail Server
[2017.04.19] 09:01:32 [20048] CMD: EHLO mail.somedomain.com
[2017.04.19] 09:01:32 [20048] RSP: 250-newmx40.qq.com
[2017.04.19] 09:01:32 [20048] RSP: 250-SIZE 73400320
[2017.04.19] 09:01:32 [20048] RSP: 250-STARTTLS
[2017.04.19] 09:01:32 [20048] RSP: 250 OK
[2017.04.19] 09:01:32 [20048] CMD: STARTTLS
[2017.04.19] 09:01:33 [20048] RSP: 220 Ready to start TLS
[2017.04.19] 09:01:33 [20048] CMD: EHLO mail.somedomain.com
[2017.04.19] 09:01:33 [20048] RSP: 250-newmx40.qq.com
[2017.04.19] 09:01:33 [20048] RSP: 250-SIZE 73400320
[2017.04.19] 09:01:33 [20048] RSP: 250 OK
[2017.04.19] 09:01:33 [20048] CMD: MAIL FROM:<no-reply@somedomain.com> SIZE=0
[2017.04.19] 09:01:34 [20048] RSP: 250 Ok
[2017.04.19] 09:01:34 [20048] CMD: RCPT TO:<xxx@qq.com>
[2017.04.19] 09:01:34 [20048] RSP: 550 Connection frequency limited. http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=20022&&no=1000722
[2017.04.19] 09:01:34 [20048] CMD: RCPT TO:<xxx@qq.com>
[2017.04.19] 09:03:04 [20048] The smtp session has timed out.
[2017.04.19] 09:03:04 [20048] Initiating connection to y.y.y.y
[2017.04.19] 09:03:04 [20048] Connecting to y.y.y.y:25 (Id: 2)
[2017.04.19] 09:03:04 [20048] Binding to local IP z.z.z.z:0 (Id: 2)
[2017.04.19] 09:03:04 [20048] Connection to y.y.y.y:25 from z.z.z.z:57791 succeeded (Id: 2)
[2017.04.19] 09:03:04 [20048] RSP: 220 newmx16.qq.com MX QQ Mail Server
[2017.04.19] 09:03:04 [20048] CMD: EHLO mail.somedomain.com
[2017.04.19] 09:03:05 [20048] RSP: 250-newmx16.qq.com
[2017.04.19] 09:03:05 [20048] RSP: 250-SIZE 73400320
[2017.04.19] 09:03:05 [20048] RSP: 250-STARTTLS
[2017.04.19] 09:03:05 [20048] RSP: 250 OK
[2017.04.19] 09:03:05 [20048] CMD: STARTTLS
[2017.04.19] 09:03:05 [20048] RSP: 220 Ready to start TLS
[2017.04.19] 09:03:05 [20048] CMD: EHLO mail.somedomain.com
[2017.04.19] 09:03:05 [20048] RSP: 250-newmx16.qq.com
[2017.04.19] 09:03:05 [20048] RSP: 250-SIZE 73400320
[2017.04.19] 09:03:05 [20048] RSP: 250 OK
[2017.04.19] 09:03:05 [20048] CMD: MAIL FROM:<no-reply@somedomain.com> SIZE=0
[2017.04.19] 09:03:06 [20048] RSP: 250 Ok
[2017.04.19] 09:03:06 [20048] CMD: RCPT TO:<xxx@qq.com>
[2017.04.19] 09:03:06 [20048] RSP: 550 Mailbox not found. http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=20022&&no=1000728
[2017.04.19] 09:03:06 [20048] CMD: RCPT TO:<xxx@qq.com>
[2017.04.19] 09:04:37 [20048] The smtp session has timed out.
[2017.04.19] 09:04:37 [20048] Initiating connection to x.x.x.x
 
anyone have any idea how I can tell the system that these emails are gone and to stop re-trying them?
 
 

Reply to Thread