Hello,
I'm writing a peer2mail client. To connect to the mailboxes I use pop3 protocol. I'm connecting to a pop3 server and downloading some mails using commands like:
- USER
- PASS
- STAT
- TOP
- RETR
I want the program to be as reliable as possible. I'd like to ask you then, if I should retry sending some commands in case of their failure. If so, which of them and how many times? Should I retry the connection to pop3server itself?
Thank you in advance for your effort,
Michael. :)
Should I retry some commands during a POP3 session?
Started by kremuwa, Jul 14 2010 03:27 AM
7 replies to this topic
#1
Posted 14 July 2010 - 03:27 AM
|
|
|
#2
Posted 16 July 2010 - 10:22 PM
Refresh.
#3
Posted 17 July 2010 - 03:58 AM
What you should do is act properly based on the protocol, not just randomly resend commands.
#4
Posted 17 July 2010 - 04:01 AM
My program works well, I do it properly but sometimes for example RETR function is failing from unknown reason - when I start again, it works. So I came to think I should retry some commands if they fail - that's the reason of my question.
#5
Posted 17 July 2010 - 04:54 AM
Is it a network issue, perhaps?
#6
Posted 17 July 2010 - 04:59 AM
You may be right. I think it'll be good to retry sending RETR comand in the case of its failure, because it takes a lot of time to read a response for such a command and issues are more possible... maybe?
#7
Posted 17 July 2010 - 05:15 AM
You may want to try diagnosing it with a command-line telnet prompt, to see what's happening.
Things that cross my mind: Are you sure you're still in a TRANSACTION state when issuing RETR? What's the exact response that indicates failure? If the connection is interrupted or times out, that would cause you to lose the TRANSACTION state, and make RETR an invalid command, for example.
Things that cross my mind: Are you sure you're still in a TRANSACTION state when issuing RETR? What's the exact response that indicates failure? If the connection is interrupted or times out, that would cause you to lose the TRANSACTION state, and make RETR an invalid command, for example.
#8
Posted 17 July 2010 - 10:07 AM
I will let you know as soon as I get this error again.


Sign In
Create Account

Back to top









