Connection Timeout (General questions)
In our system, different client connect to our service to relay the mails. Sometime email get stuck in between after RCPT To command and keep waiting. in transcript , it show both Mail_To and Mail_Form event send SmtpActions.Allow to client. But we never receive the Data event back from the client and keep waiting until timeout.
As such we are using Outlook to send email to the service hosted in cloud. Our service is sending OK for Mail_to and Mail-From Event, but never receive the Data event or mail_started event. Could it be possible that running the SMTP in full threads is causing any issue or some threads loosing its context?
Any information / debugging suggestion?
Connection Timeout
Hi.
I don't see any specific reasons why DATA event would not be fired. If you check the transcript, did client send DATA command at all?
Jasmine
Connection Timeout
I have check the SMTP Log file from the Client. The log show the connection and error from Client Side:
,Received certificate
2016-04-14T10:31:00.630Z,Windows SBS Internet Send NMXSBS,08D356C0C9950E2D,19,192.168.0.214:38886,168.62.204.113:25,*,234523452345234523452435245,Certificate thumbprint
2016-04-14T10:31:00.630Z,Windows SBS Internet Send NMXSBS,08D356C0C9950E2D,20,192.168.0.214:38886,168.62.204.113:25,>,EHLO Client,
2016-04-14T10:31:00.661Z,Windows SBS Internet Send NMXSBS,08D356C0C9950E2D,21,192.168.0.214:38886,168.62.204.113:25,<,"250-Server Hello abc.com [IPAddress], nice to meet you",
2016-04-14T10:31:00.661Z,Windows SBS Internet Send NMXSBS,08D356C0C9950E2D,22,192.168.0.214:38886,168.62.204.113:25,<,250-EXPN,
2016-04-14T10:31:00.661Z,Windows SBS Internet Send NMXSBS,08D356C0C9950E2D,23,192.168.0.214:38886,168.62.204.113:25,<,250-STARTTLS,
2016-04-14T10:31:00.661Z,Windows SBS Internet Send NMXSBS,08D356C0C9950E2D,24,192.168.0.214:38886,168.62.204.113:25,<,250-HELP,
2016-04-14T10:31:00.661Z,Windows SBS Internet Send NMXSBS,08D356C0C9950E2D,25,192.168.0.214:38886,168.62.204.113:25,<,250-PIPELINING,
2016-04-14T10:31:00.661Z,Windows SBS Internet Send NMXSBS,08D356C0C9950E2D,26,192.168.0.214:38886,168.62.204.113:25,<,250 8BITMIME,
2016-04-14T10:31:00.661Z,Windows SBS Internet Send NMXSBS,08D356C0C9950E2D,27,192.168.0.214:38886,168.62.204.113:25,*,75962,sending message
2016-04-14T10:31:00.661Z,Windows SBS Internet Send NMXSBS,08D356C0C9950E2D,28,192.168.0.214:38886,168.62.204.113:25,>,MAIL FROM:<email address sender>,
2016-04-14T10:31:00.661Z,Windows SBS Internet Send NMXSBS,08D356C0C9950E2D,29,192.168.0.214:38886,168.62.204.113:25,>,RCPT TO:<Email Address TO>,
2016-04-14T10:31:12.939Z,Windows SBS Internet Send NMXSBS,08D356C0C9950E2D,30,192.168.0.214:38886,168.62.204.113:25,<,250 <email address sender>... sender ok,
2016-04-14T10:31:13.157Z,Windows SBS Internet Send NMXSBS,08D356C0C9950E2D,31,192.168.0.214:38886,168.62.204.113:25,<,250 <email address TO>... recipient ok,
2016-04-14T10:31:13.157Z,Windows SBS Internet Send NMXSBS,08D356C0C9950E2D,32,192.168.0.214:38886,168.62.204.113:25,>,DATA,
2016-04-14T10:38:21.916Z,Windows SBS Internet Send NMXSBS,08D356C0C9950E2E,0,,54.152.144.243:25,*,,attempting to connect
2016-04-14T10:38:42.929Z,Windows SBS Internet Send NMXSBS,08D356C0C9950E2E,1,,54.152.144.243:25,*,,"Failed to connect. Error Code: 10060, Error Message: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond IP:25"
2016-04-14T10:38:42.929Z,Windows SBS Internet Send NMXSBS,08D356C0C9950E2E,0,,52.200.243.123:25,*,,attempting to connect
2016-04-14T10:39:03.943Z,Windows SBS Internet Send NMXSBS,08D356C0C9950E2E,1,,52.200.243.123:25,*,,"Failed to connect. Error Code: 10060, Error Message: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond IP:25"
2016-04-14T10:41:14.112Z,Windows SBS Internet Send NMXSBS,08D356C0C9950E2D,33,192.168.0.214:38886,168.62.204.113:25,-,,Remote
Log From SMTP Server Component.
1: Client IP address got connected on the component.
Transcript saved from the Log.
EHLO Client
250-eServerSide Hello Client [IPAddress], nice to meet you
250-EXPN
250-STARTTLS
250-HELP
250-PIPELINING
250 8BITMIME
STARTTLS
220 Go ahead, negotiate
EHLO Client
250-Server Hello Client [IPAddress], nice to meet you
250-EXPN
250-STARTTLS
250-HELP
250-PIPELINING
250 8BITMIME
MAIL FROM:<Sender>
250 <Sender>... sender ok
RCPT TO:<Receiver>
250 <Receiver>... sender ok
Server is waiting for mail start command .ie DATA but didn't receive.
2: Stoped the SMTP server component and Now Client IP address is disconnected.
Event the client remain connected through out the session but SMTPSERVER don't receive the DATA command after RCPT TO command and Client server failed with message Serer didn't respond.
We have one uptime connector service, it check whether the SMTP server is running or not. It keeps connecting and disconnecting from server very often.
It happening most of the time.
Thanks.
Connection Timeout
Hi.
Do you use most up-to-date version of wodSmtpServer? Does this issue happen with our samples as well?
How can we duplicate this issue? I don't see a reason for wodSmtpServer not to receive DATA if it was sent by the client.
Jasmine.
Connection Timeout
SMTP component version is 2.6.0.106. Is there any way to log the internal call of components?
Its kind of wired issue Client is connected in session with Server. But can't deliver the command sometime. Should i call explicitly SMTPAction.Allow on each event? calling event in following ways
WodSMTPServerCom.MailStart += new _IwodSmtpServerComEvents_MailStartEventHandler(mSMTP_MailStart);
Thanks.
Connection Timeout
Hi.
No, you cannot log internaly received data. We could prepare special DLL to do this type of logging to isolate the issue if needed.
Are you using component in multithreaded environment?
Jasmine.
Connection Timeout
yes
Connection Timeout
Hi.
Can you be more specific? Are you using component from various threads? If so, this could explain why you're not receiving events sometimes.
Jasmine.
Connection Timeout
Previous message, was sent by mistake.
Yes, we are using Full Threading mode. So SMTP Server has following setting, when starting
WodSMTPServerCom.Threads = ThreadTypes.FullThreads //threading level - 2
WodSMTPServerCom.Security = SmtpSecurityEnum.SecurityRequired;
WodSMTPServerCom.SecureProtocol = SecureProtocols.ProtAll;
WodSMTPServerCom.Timeout = 400; //Added later after getting issue with DATA command.
For Testing , we are also logging user transcripts from the SMTPServer
WodSMTPServerCom.Command += new _IwodSmtpServerComEvents_CommandEventHandler(WodSMTPServerCom_Command); //For Logging.
One more thing, we are running SMTPServer Class on thread.
//Could this be overkill.
SMTPRelayWorker RelayWorker = new SMTPRelayWorker(settings);
Thread othread = new Thread(new ThreadStart(RelayWorker.StartRelayWorker));
othread.Start();
Thanks,
Ajitpal
Connection Timeout
Hi.
You cannot use wodSmtpServer from thread where you did not initialize it - and most probably you cannot initialize it from worker thread, this could be possible reason. Thread dies - wodSmtpServer dies as well.
Can you move everything in same thread (FullThreads property is ok to leave it as is).
If problem doesn't help, please send email to techsupport - at - weonlydo.com and we will propare DLL with debug info that will dump everything that's received and what functions were called from there to try to isolate the issue.
Jasmine.