Author |
|
leei Newbie
Joined: 21 October 2007 Location: United States
Online Status: Offline Posts: 7
|
Posted: 21 October 2007 at 6:13am | IP Logged
|
|
|
Hi,
I'm new to this library so hopefully this isn't something I could easily find an answer to rather than ask here.
During the execution of POP3.Disconnect I'm receiving a connection time-out error. The logs from both ends appear to be what I expect. I can reproduce this using the POP3Demo2 app which is connecting to a POP server on my local LAN. I'm hoping that someone here can help. Here's the logs form both ends of a session (the abort at the end of the log is me exiting the demo application):
Thanks in advance,
Lee
Log from POP3Demo2 (Local Time)
===============================
[06:39:01.36] [INFO] Assembly version: 2.0.0.6.
[06:39:01.52] [INFO] Get the list of POP3 capabilities via CAPA command.
[06:39:01.52] [SEND] CAPA\r\n
[06:39:01.52] [RECV] -ERR \r\n
[06:39:01.55] [INFO] Warning: The server does not support CAPA command. POP3 pipelining will not be available. The server responded: -ERR .
[06:39:01.55] [INFO] Get the list of advertized SASL authentication methods via AUTH command.
[06:39:01.55] [SEND] AUTH\r\n
[06:39:01.57] [RECV] -ERR \r\n
[06:39:01.57] [INFO] Warning: The server does not support AUTH command. SASL authentication will not be available. The server responded: -ERR .
[06:39:01.57] [INFO] Will login as "user01".
[06:39:01.57] [INFO] Will try regular USER/PASS authentication.
[06:39:01.58] [SEND] USER user01\r\n
[06:39:01.58] [RECV] +OK \r\n
[06:39:01.58] [SEND] PASS ********\r\n
[06:39:01.63] [RECV] +OK \r\n
[06:39:01.63] [INFO] Logged in as "user01".
[06:39:01.66] [INFO] Download inbox statistics.
[06:39:01.66] [SEND] STAT\r\n
[06:39:01.66] [RECV] +OK 3 877116\r\n
[06:39:01.67] [INFO] Will download message headers (startIndex=1, count=3).
[06:39:01.67] [INFO] Download the list of lengths of all messages in inbox.
[06:39:01.67] [SEND] LIST\r\n
[06:39:01.67] [RECV] +OK 3 877116\r\n1 1803\r\n2 292302\r\n3 583011\r\n.\r\n
[06:39:01.71] [SEND] TOP 1 0\r\n
[06:39:01.71] [RECV] +OK \r\nDate: Sat, 20 Oct 2007 14:46:00 -000 <snip>
[06:39:01.72] [SEND] TOP 2 0\r\n
[06:39:01.77] [RECV] +OK \r\n [Total 272 bytes received.]
[06:39:01.77] [SEND] TOP 3 0\r\n
[06:39:01.88] [RECV] +OK \r\n [Total 308 bytes received.]
[06:39:01.99] [INFO] Downloaded message headers (startIndex=1, count=3).
[06:39:02.00] [SEND] QUIT\r\n
[06:39:02.00] [RECV] +OK\r\n
[06:39:23.05] [INFO] Error: Socket connection has timed out. InnerException message follows: 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
[06:39:23.05] [INFO] Will disconnect from host "qedlink".
[06:39:23.07] [INFO] Disconnected from host "qedlink".
[06:41:05.50] [INFO] User code called Abort.
Log from mail server (UTC)
==========================
2007/10/21 12:38:55 POP3Session {1} > NewConnection
2007/10/21 12:38:55 POP3Session {1} < +OK «¬
2007/10/21 12:38:56 POP3Session {1} > CAPA«¬
2007/10/21 12:38:56 POP3Session {1} < -ERR «¬
2007/10/21 12:38:56 POP3Session {1} > AUTH«¬
2007/10/21 12:38:56 POP3Session {1} < -ERR «¬
2007/10/21 12:38:56 POP3Session {1} > USER user01«¬
2007/10/21 12:38:56 POP3Session {1} < +OK «¬
2007/10/21 12:38:56 POP3Session {1} > PASS 12345«¬
2007/10/21 12:38:56 POP3Session {1} < +OK «¬
2007/10/21 12:38:56 POP3Session {1} > STAT«¬
2007/10/21 12:38:56 POP3Session {1} < +OK 3 877116«¬
2007/10/21 12:38:56 POP3Session {1} > LIST«¬
2007/10/21 12:38:56 POP3Session {1} < +OK 3 877116«¬1 1803«¬2 292302«¬3 583011«¬.«¬
2007/10/21 12:38:56 POP3Session {1} > TOP 1 0«¬
2007/10/21 12:38:56 POP3Session {1} < +OK «¬Date: Sat, 20 Oct 2007 14:46:00
2007/10/21 12:38:56 POP3Session {1} > TOP 2 0«¬
2007/10/21 12:38:56 POP3Session {1} < +OK «¬Date: Sat, 20 Oct 2007 14:43:00
2007/10/21 12:38:56 POP3Session {1} > TOP 3 0«¬
2007/10/21 12:38:56 POP3Session {1} < +OK «¬Date: Sat, 20 Oct 2007 14:41:08
2007/10/21 12:38:56 POP3Session {1} > QUIT«¬
2007/10/21 12:38:56 POP3Session {1} < +OK«¬
|
Back to Top |
|
|
Andrew AfterLogic Support
Joined: 28 April 2006 Location: United States
Online Status: Offline Posts: 1189
|
Posted: 22 October 2007 at 2:03am | IP Logged
|
|
|
This is well known issue. Some mail servers close connections not properly, they just suddenly close socket without necessary confirmation. We implemented a workaround for that issue in MailBee.NET Objects v3 (will be released later in October). Please download the latest version of MailBee.NET.dll and try again.
Best regards,
Andrew
|
Back to Top |
|
|
leei Newbie
Joined: 21 October 2007 Location: United States
Online Status: Offline Posts: 7
|
Posted: 24 October 2007 at 7:34am | IP Logged
|
|
|
Hi Andrew,
Thanks for your quick reply. I downloaded and installed the latest DLL (3.0.1.70) but am still seeing the same error.
I have the option of having changes made to the mail server. So, if there are some steps that should be done to properly end the connection I can ask that they be added to the mail server.
Regards,
Lee Inman
|
Back to Top |
|
|
Andrew AfterLogic Support
Joined: 28 April 2006 Location: United States
Online Status: Offline Posts: 1189
|
Posted: 24 October 2007 at 7:39am | IP Logged
|
|
|
Is it possible to provide us with a test account on your mail server the issue can be reproduced on? So we would be able to reproduce and investigate the issue directly. Please use Request Support Form for this purpose.
Best regards,
Andrew
|
Back to Top |
|
|
leei Newbie
Joined: 21 October 2007 Location: United States
Online Status: Offline Posts: 7
|
Posted: 24 October 2007 at 7:58am | IP Logged
|
|
|
Andrew,
The mail server is part of a local Windows application - no public access. I'd be happy to send it to you with a configuration file and setup instructions. Probably less than 5 minutes to install and set up.
-Lee
|
Back to Top |
|
|
Andrew AfterLogic Support
Joined: 28 April 2006 Location: United States
Online Status: Offline Posts: 1189
|
Posted: 25 October 2007 at 12:47am | IP Logged
|
|
|
Do you have an antivirus or a firewall software installed on the workstation/server your application powered by MailBee.NET Objects installed on? If so, it may intercept POP3 traffic and mess up normal closing connection. Try to disable it for testing purpose.
If it doesn't help, please provide us with the download link where we can download the mail server you use or provide us with the installer and the configuration file. Please use Request Support Form for this purpose.
Best regards,
Andrew
|
Back to Top |
|
|
Andrew AfterLogic Support
Joined: 28 April 2006 Location: United States
Online Status: Offline Posts: 1189
|
Posted: 25 October 2007 at 5:25am | IP Logged
|
|
|
If the issue is not caused by a firewall/antivirus software, most probably, this is a bug of your mail server. It doesn't send necessary confirmation on closing socket. There is a workaround: set small timeout before Disconnect method call and catch MailBeeSocketTimeoutException as follows:
Code:
pop.Timeout = 500; // Set 500ms timeout
try
{
pop.Disconnect();
}
catch (MailBeeSocketTimeoutException)
{
} |
|
|
However, if your application works with various POP3 servers, we recommend you to implement additional check for the POP3 server your application is connected with, so this workaround should work only for the server which causes the issue.
Best regards,
Andrew
|
Back to Top |
|
|