I have a c# routine that runs mailman.CheckMail() every 5 minutes against the POP3 service on outlook.com. Every once in a while the check fails with unknown user name or bad password. It happens at least once an hour, but the remaining times it works just fine. The code used is fairly simple:
This may not be a chilkat or programming issue, but can I always trust that the login is properly transmitted to the POP3 server? I would be able to understand recurring connection issues or similar cause, but since it appears the the connection is established properly, that does not seem to be the cause. Of course it could be a Microsoft internal problem but then there is most likely nothing I can do to solve the problem. The full error message is:
|
Here are some comments: 1) Instead of calling VerifyPopConnection, I would recommend calling Pop3BeginSession which connects and authenticates. 2) I've noticed the same behavior in non-Chilkat apps. For example, from time to time when checking email on my IPhone, I get an error message indicating the login is invalid -- but I know it is not. I wonder if this is somehow related? 3) Turn on VerboseLogging, and examine the contents of the Pop3SessionLog property. With verbose logging on, the Pop3SessionLog should contain the login/password. With verbose logging off, the password would be excluded from the log. You can use the session log to verify that the correct login/password was indeed being sent. Thanks, I will your recommendations and monitor logged error messages. I will post the results in a few days.
(May 07 '13 at 18:08)
roan98dk
Be careful about posting the session log w/ verbose logging. You may wish to send that to me in private email (support@chilkatsoft.com)
(May 07 '13 at 18:18)
chilkat ♦♦
Of course :-) Whenever I post logs in general, I always scramble details that can identify passwords, users, servers etc.
(May 07 '13 at 19:32)
roan98dk
I already received the first error which unfortunately is exactly the same as before. LastErrorText (received right after Pop3BeginSession) is identical to the one already posted. Pop3SessionLog does not reveal any interesting details. I see the username but password is still scrambled. I have enabled verbose logging.
(May 07 '13 at 19:35)
roan98dk
I thought verbose logging would cause the password to get logged -- but I was not correct. This new build will log the password to the Pop3SessionLog and LastErrorText when VerboseLogging is turned on. http://www.chilkatsoft.com/preRelease/ChilkatDotNet45-9.4.1-win32.zip
(May 08 '13 at 11:37)
chilkat ♦♦
Unfortunately I am not able to test this new build easily since the POP3 connection is only used in production environment and for now I do not have a duplicate account to use while debugging. I will most likely not be able to test this before the new release, which is when btw?
(May 08 '13 at 13:35)
roan98dk
The new release is coming as soon as possible. Hopefully by the beginning of June.
(May 08 '13 at 15:59)
chilkat ♦♦
It is a holiday now here in Denmark, so I will test the pre-release while it ought not affect any customers.
(May 08 '13 at 18:36)
roan98dk
Ok, I have tested now and unfortunately both actual username and password sent are correct. Does this mean that the error must be on the server side ?
(May 09 '13 at 04:57)
roan98dk
Yes, the evidence points to it.
(May 09 '13 at 11:02)
chilkat ♦♦
I have asked Microsoft Partner Support to investigate the issue. Unfortunately they started by saying that they discourage the use of POP3 in favor of IMAP, but when I tried IMAP the pattern is exactly the same. Their first comment was that is must be a network connection failure, but then I feel that the error message should have said so. I suppose that while sending POP3 and IMAP commands we cannot be absolutely certain that all sent characters arrive intact at the server, or can we? If we can then the error must be with Microsoft.
(May 11 '13 at 07:27)
roan98dk
I mentioned this earlier, but I get this from time to time when accessing my email from my IPhone with the default IPhone email app. The error message indicates a bad username/password. But then I try again and it works. It happens sporadically from time to time.
(May 11 '13 at 09:52)
chilkat ♦♦
I tried with a 5 second delay, but in many cases it still fails the second time. I will try with various different delays and see if that has any impact.
(May 13 '13 at 04:50)
roan98dk
showing 5 of 13
show all
|
I would like to add that after I added a retry delay of 10 seconds, I practically get no authentication failures logged. For clarification my code now looks like this:
Perhaps Pop3BeginSession() could have an optional argument to retry automatically x number of times or after a specified delay before failing completely?! Since this is little extra code I had to add, it hardly justify modifying Pop3BeginSession(). The same problem happens with IMAP though, so if a workaround will be introduced in Pop3BeginSession(), it should also be implemented in IMAP's Login() method. Too bad that my discussion with Microsoft over this problem has led nowhere so far. Their attitude seems to indicate random network errors rather than internal authentication errors. |