Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET POP3

 AfterLogic Forum : MailBee.NET POP3
Subject Topic: Socket connection was aborted by remote h Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
coocieca
Newbie
Newbie


Joined: 07 May 2009
Location: Canada
Online Status: Offline
Posts: 16
Posted: 04 July 2011 at 12:06pm | IP Logged Quote coocieca

We cannot find the problem from c# code, should change some settings to exchange server? Thx!

CODE:

Pop3 pop = new Pop3();
pop.Log.Enabled = true;
pop.Log.Filename = @"C:\mblog.txt";
pop.InboxPreloadOptions = Pop3InboxPreloadOptions.Uidl;
pop.Connect("mail.xxxx.com", 110);
if (pop.IsConnected)
{
    pop.Login("janet", "ppp");
    MailMessage message;
    string[] messageUids = pop.GetMessageUids();
    message = pop.DownloadEntireMessage(1);
}



LOG:

[14:45:46.53] [INFO] Assembly version: 5.9.2.201.
[14:45:46.53] [INFO] Will resolve host "mail.xxxx.com".
[14:45:46.53] [INFO] Host "mail.xxxx.com" resolved to IP address(es) 22.222.222.222.
[14:45:46.53] [INFO] Will connect to host "mail.xxxx.com" on port 110.
[14:45:46.61] [INFO] Socket connected to IP address 22.222.222.222 on port 110.
[14:45:46.70] [RECV] +OK The Microsoft Exchange POP3 service is ready.\r\n
[14:45:46.70] [INFO] Connected to mail service at host "mail.xxxx.com" on port 110 and ready.
[14:45:46.70] [INFO] Get the list of POP3 capabilities via CAPA command.
[14:45:46.70] [SEND] CAPA\r\n
[14:45:46.79] [RECV] +OK\r\nTOP\r\nUIDL\r\nSASL NTLM GSSAPI PLAIN\r\nUSER\r\nSTLS\r\n.\r\n
[14:45:46.79] [INFO] Will login as "janet".
[14:45:46.79] [INFO] Will try SASL NTLM authentication method.
[14:45:46.79] [SEND] AUTH NTLM\r\n
[14:45:46.87] [RECV] + \r\n
[14:45:46.87] [SEND] TlRMTVNTUAABAAAAAoIAAAAAAAAAAAAAAAAAAAAAAAA=\r\n
[14:45:46.96] [RECV] + TlRMTVNTUAACAAAABwAHADgAAAAGgoECUnrRU30idjYAAAAAAAAAAIIAggA/AAAABgGxHQAAAA9WQU5BUlRTAgAOAFYAQQBOAEEAUgBUAFMAAQAGAEUAWAAwAAQAFgB2AGEAbgBhAHIAdABzAC4AYwBvAG0AAwAeAGUAeAAwAC4AdgBhAG4AYQByAHQAcwAuAGMAbwBt AAUAFgB2AGEAbgBhAHIAdABzAC4AYwBvAG0ABwAIAN2sHI96OswBAAAAAA==\r\n
[14:45:46.96] [SEND] TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAAAwAAAABQAFAHAAAAAAAAAAQwAAAAAAAABDAAAAAoIAAPtzboOjuYDEPRcvvfwuphSI/724CzOUej7YIAIt1YmDhS7p039fgqrxB63P2WYE4GphbmV0\r\n
[14:45:47.09] [RECV] +OK User successfully logged on.\r\n
[14:45:47.10] [INFO] Logged in as "janet".
[14:45:47.10] [INFO] Download inbox statistics.
[14:45:47.10] [SEND] STAT\r\n
[14:45:47.17] [RECV] +OK 56 1280398\r\n
[14:45:47.17] [INFO] Download the list of Unique-IDs of all messages in inbox.
[14:45:47.18] [SEND] UIDL\r\n
[14:45:47.27] [RECV] +OK\r\n [Total 424 bytes received.]
[14:45:47.27] [INFO] Will download entire message (index=1).
[14:45:47.27] [SEND] RETR 1\r\n
[14:45:48.10] [INFO] Error: Socket connection was aborted by remote host.
[14:45:48.10] [INFO] Will disconnect from host "mail.xxxx.com".
[14:45:48.10] [INFO] Disconnected from host "mail.xxxx.com".
Back to Top View coocieca's Profile Search for other posts by coocieca
 
coocieca
Newbie
Newbie


Joined: 07 May 2009
Location: Canada
Online Status: Offline
Posts: 16
Posted: 04 July 2011 at 12:21pm | IP Logged Quote coocieca

This code works. But we have to download the Uids before download EntireMessage. Thx!!!


CODE:

Pop3 pop = new Pop3();
pop.Log.Enabled = true;
pop.Log.Filename = @"C:\mblog.txt";
//pop.InboxPreloadOptions = Pop3InboxPreloadOptions.Uidl;
pop.Connect("mail.xxxx.com", 110);
if (pop.IsConnected)
{
    pop.Login("janet", "ppp");
    MailMessage message;
    //string[] messageUids = pop.GetMessageUids();
    message = pop.DownloadEntireMessage(1);
}


LOG:

[15:14:01.48] [INFO] Assembly version: 5.9.2.201.
[15:14:01.48] [INFO] Will resolve host "mail.xxxx.com".
[15:14:01.62] [INFO] Host "mail.xxxx.com" resolved to IP address(es) 22.222.222.222.
[15:14:01.62] [INFO] Will connect to host "mail.xxxx.com" on port 110.
[15:14:01.70] [INFO] Socket connected to IP address 22.222.222.222 on port 110.
[15:14:01.79] [RECV] +OK The Microsoft Exchange POP3 service is ready.\r\n
[15:14:01.80] [INFO] Connected to mail service at host "mail.xxxx.com" on port 110 and ready.
[15:14:01.80] [INFO] Get the list of POP3 capabilities via CAPA command.
[15:14:01.80] [SEND] CAPA\r\n
[15:14:01.88] [RECV] +OK\r\nTOP\r\nUIDL\r\nSASL NTLM GSSAPI PLAIN\r\nUSER\r\nSTLS\r\n.\r\n
[15:14:01.89] [INFO] Will login as "janet".
[15:14:01.89] [INFO] Will try SASL NTLM authentication method.
[15:14:01.89] [SEND] AUTH NTLM\r\n
[15:14:01.97] [RECV] + \r\n
[15:14:01.97] [SEND] TlRMTVNTUAABAAAAAoIAAAAAAAAAAAAAAAAAAAAAAAA=\r\n
[15:14:02.04] [RECV] + TlRMTVNTUAACAAAABwAHADgAAAAGgoECR/I8NKYGMewAAAAAAAAAAIIAggA/AAAABgGxHQAAAA9WQU5BUlRTAgAOAFYAQQBOAEEAUgBUAFMAAQAGAEUAWAAwAAQAFgB2AGEAbgBhAHIAdABzAC4AYwBvAG0AAwAeAGUAeAAwAC4AdgBhAG4AYQByAHQAcwAuAGMAbwBt AAUAFgB2AGEAbgBhAHIAdABzAC4AYwBvAG0ABwAIAL2XcYF+OswBAAAAAA==\r\n
[15:14:02.04] [SEND] TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAAAwAAAABQAFAHAAAAAAAAAAQwAAAAAAAABDAAAAAoIAALYcGLu9pgoI4MSJkduJPsHKpKsArPVUN9GxPqYR7dGNJdTk1YM+Atq/5WSFKAcpO2phbmV0\r\n
[15:14:02.15] [RECV] +OK User successfully logged on.\r\n
[15:14:02.15] [INFO] Logged in as "janet".
[15:14:02.15] [INFO] Download inbox statistics.
[15:14:02.15] [SEND] STAT\r\n
[15:14:02.22] [RECV] +OK 59 1290758\r\n
[15:14:02.22] [INFO] Will download entire message (index=1).
[15:14:02.22] [SEND] RETR 1\r\n
[15:14:02.91] [RECV] +OK\r\n [Total 64687 bytes received.]
[15:14:02.91] [INFO] Downloaded entire message (index=1).
Back to Top View coocieca's Profile Search for other posts by coocieca
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 04 July 2011 at 12:34pm | IP Logged Quote Alex

Please make sure the problem reproduces with the current version 6.10. If it does, please provide the log from v6.10.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
coocieca
Newbie
Newbie


Joined: 07 May 2009
Location: Canada
Online Status: Offline
Posts: 16
Posted: 05 July 2011 at 7:38am | IP Logged Quote coocieca

We just ordered Maintenance Renewal, please see the log, Socket connection timed out after downloaded first message:

Thanks!


[10:28:22.48] [INFO] Assembly version: 6.10.2.308.
[10:28:22.48] [INFO] Will resolve host "mail.xxxx.com".
[10:28:22.48] [INFO] Host "mail.xxxx.com" resolved to IP address(es) 222.222.222.2222.
[10:28:22.48] [INFO] Will connect to host "mail.xxxx.com" on port 110.
[10:28:22.56] [INFO] Socket connected to IP address 222.222.222.2222 on port 110.
[10:28:22.63] [RECV] +OK The Microsoft Exchange POP3 service is ready.\r\n
[10:28:22.63] [INFO] Connected to mail service at host "mail.xxxx.com" on port 110 and ready.
[10:28:26.69] [INFO] Get the list of POP3 capabilities via CAPA command.
[10:28:26.69] [SEND] CAPA\r\n
[10:28:26.77] [RECV] +OK\r\nTOP\r\nUIDL\r\nSASL NTLM GSSAPI PLAIN\r\nUSER\r\nSTLS\r\n.\r\n
[10:28:26.77] [INFO] Will login as "janet".
[10:28:26.77] [INFO] Will try SASL NTLM authentication method.
[10:28:26.77] [SEND] AUTH NTLM\r\n
[10:28:26.84] [RECV] + \r\n
[10:28:26.84] [SEND] TlRMTVNTUAABAAAAl4II4gAAAAAAAAAAAAAAAAAAAAAGAbAdAAAADw==\r\n
[10:28:26.91] [RECV] + TlRMTVNTUAACAAAADgAOADgAAAAVgoniSJZiLfh+7IoAAAAAAAAAAIIAggBGAAAABgGxHQAAAA9WAEEATgBBAFIAVABTAAIADgBWAEEATgBBAFIAVABTAAEABgBFAFgAMAAEABYAdgBhAG4AYQByAHQAcwAuAGMAbwBtAAMAHgBlAHgAMAAuAHYAYQBuAGEAcgB0AHMA LgBjAG8AbQAFABYAdgBhAG4AYQByAHQAcwAuAGMAbwBtAAcACACtLcPFHzvMAQAAAAA=\r\n
[10:28:26.91] [SEND] TlRMTVNTUAADAAAAGAAYAHoAAAAKAQoBkgAAAAwADABYAAAACgAKAGQAAAAMAAwAbgAAABAAEACcAQAAFYKI4gYBsB0AAAAP1dNomQT91Q3LjQVfoHooRUgAUAAyADAAMQAwAGoAYQBuAGUAdABIAFAAMgAwADEAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADOoiFE CI5QL9Vrs+foBk+yAQEAAAAAAACtLcPFHzvMAVkA53YrzEjQAAAAAAIADgBWAEEATgBBAFIAVABTAAEABgBFAFgAMAAEABYAdgBhAG4AYQByAHQAcwAuAGMAbwBtAAMAHgBlAHgAMAAuAHYAYQBuAGEAcgB0AHMALgBjAG8AbQAFABYAdgBhAG4AYQByAHQAcwAuAGMA bwBtAAcACACtLcPFHzvMAQYABAACAAAACAAwADAAAAAAAAAAAAAAAAAwAAD7ozdo5KGClr+lJFI5b/jPUts1otgBDbeNzLBNQpO/6goAEAAAAAAAAAAAAAAAAAAAAAAACQAAAAAAAAAAAAAAAAAAABKAEY/6flpVuRLHo+E4X9w=\r\n
[10:28:26.98] [RECV] -ERR Logon failure: unknown user name or bad password.\r\n
[10:28:27.00] [INFO] Will try SASL PLAIN authentication method.
[10:28:27.00] [SEND] AUTH PLAIN\r\n
[10:28:27.07] [RECV] + \r\n
[10:28:27.07] [SEND] ********\r\n
[10:28:27.17] [RECV] +OK User successfully logged on.\r\n
[10:28:27.17] [INFO] Logged in as "janet".
[10:28:27.17] [INFO] Download inbox statistics.
[10:28:27.17] [SEND] STAT\r\n
[10:28:27.24] [RECV] +OK 84 1777193\r\n
[10:28:27.24] [INFO] Download the list of Unique-IDs of all messages in inbox.
[10:28:27.24] [SEND] UIDL\r\n
[10:28:27.31] [RECV] +OK\r\n1 14\r\n2 19\r\n3 20\r\n4 25\r\n5 26\r\n6 27\r\n7 28\r\n8 29\r\n9 30\r\n10 31 ... 206\r\n78 207\r\n79 209\r\n80 210\r\n81 211\r\n82 212\r\n83 213\r\n84 214\r\n.\r\n [Total 648 bytes received.]
[10:28:32.58] [INFO] Will download entire message (index=1).
[10:28:32.59] [SEND] RETR 1\r\n
[10:28:33.27] [RECV] +OK\r\nReceived: from nm2-vm0.bullet.mail.ac4.yahoo.com ([98.139.5 ... 0957060347252YahooMailClassicweb57409mailre1yahoocom_--\r\n\r\n\r\n.\r\n [Total 64688 bytes received.]
[10:28:33.27] [INFO] Downloaded entire message (index=1).
[10:28:36.78] [INFO] Will download entire message (index=2).
[10:28:36.78] [SEND] RETR 2\r\n
[10:28:57.30] [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
[10:28:57.30] [INFO] Will disconnect from host "mail.xxxx.com".
[10:28:57.30] [INFO] Disconnected from host "mail.xxxx.com".
Back to Top View coocieca's Profile Search for other posts by coocieca
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 05 July 2011 at 8:10am | IP Logged Quote Alex

Thank you. I see 3 seconds delay between [10:28:33.27] [INFO] Downloaded entire message (index=1) and [10:28:36.78] [INFO] Will download entire message (index=2).

What happens in between? What happens if you download both mails in a single command Pop3.DownloadEntireMessages(1, 2)?

BTW, is it possible to get a test account?

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
coocieca
Newbie
Newbie


Joined: 07 May 2009
Location: Canada
Online Status: Offline
Posts: 16
Posted: 05 July 2011 at 8:31am | IP Logged Quote coocieca

For the 3 seconds delay, because of I was tracing the code step by step.

I tested DownloadEntireMessages(1, 2) and got same error.

I asked our client to setup a text account, I will forward to you ASAP.

Thanks!


[11:16:02.39] [INFO] Will download entire message (index=1).
[11:16:02.39] [SEND] RETR 1\r\n
[11:16:03.11] [RECV] +OK\r\nReceived: from nm2... 0957060347252Y... [Total 64687 bytes received.]
[11:16:03.12] [INFO] Downloaded entire message (index=1).
[11:16:03.12] [INFO] Will download entire message (index=2).
[11:16:03.12] [SEND] RETR 2\r\n
[11:16:23.63] [INFO] Error: Socket connection has timed out.



[11:19:49.83] [INFO] Will download entire messages (startIndex=1, count=2).
[11:19:49.83] [SEND] RETR 1\r\n
[11:19:50.32] [RECV] +OK\r\nReceived: from nm2-... [Total 64688 bytes received.]
[11:19:50.33] [SEND] RETR 2\r\n
[11:20:10.84] [INFO] Error: Socket connection has timed out. ... because connected host has failed to respond
[11:20:10.84] [INFO] Will disconnect from host


Back to Top View coocieca's Profile Search for other posts by coocieca
 
coocieca
Newbie
Newbie


Joined: 07 May 2009
Location: Canada
Online Status: Offline
Posts: 16
Posted: 05 July 2011 at 8:59am | IP Logged Quote coocieca

I have forwarded the testing account throught Helpdesk.
Back to Top View coocieca's Profile Search for other posts by coocieca
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 05 July 2011 at 11:03am | IP Logged Quote Alex

Looks like forcing plain-text authentication prevents Exchange from breaking the connection.

Code:
pop.Login("user", "pass", AuthenticationMethods.Regular);


we'll continue testing to find out if it's possible to have secure auth fixed. It works with Exchange 2010 and 2007 but this one is probably of a different version.

Please keep the test account working. Thanks.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 05 July 2011 at 1:01pm | IP Logged Quote Alex

Testing with Outlook Express showed the same problem. Using secure authentication makes this Exchange installation go wild.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
samanis
Newbie
Newbie


Joined: 23 August 2011
Location: Iran
Online Status: Offline
Posts: 1
Posted: 11 September 2011 at 4:40am | IP Logged Quote samanis

Hi Igor
I got the same error while trying to download a 1MB attachment using QuickDownloadMessage method.
Any recent solution?
Back to Top View samanis's Profile Search for other posts by samanis
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 12 September 2011 at 8:07am | IP Logged Quote Alex

Try using the full procedure (create Pop3 object, and so on). If the problem persists, enable logging and post your log file. Thanks.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide