Maybe James should do some graceful degradation.

 * If there is an error, try using default values for headers that give parse errors
 * If that fails, try serving the raw message content. (Not interpreted by the 
javax.mail classes)
 * If that fails, server a message of despair ("An internal error occurred. We're 
terribly sorry.")

But in the end it should always give the proper termination character, since clients 
expect it.

Cheers,

        Hes.

-----Original Message-----
From: John Glorioso [mailto:[EMAIL PROTECTED] 
Sent: donderdag 7 oktober 2004 14:57
Subject: Re: RE: weird TOP err in pop server

Damn outlook. I try to make sure I am sending plain text when mailing this list. 
Perhaps it was the message content. heh.

So I suppose that presents a sticky situation with how to deal with it on the James 
server side. In my particular case, the content encoding header was invalid ("plain" 
as opposed to "text/plain"). When a "TOP <msgid> 0" command was sent to the server, it 
still executed the block that retrieves the message and it failed I assume because of 
that invalid header. I have not dug deep enough to see why the RETR command works okay 
though. In any case, how should the server respond in this case? It could default the 
encoding to text plain of course, but that does not seem to be the real issue. I guess 
the real issue is how should the server react in the case where it encounters an error 
after it sends out the +OK response? Should it return the error message and follow up 
with the period finalizer?

-----  Original Message  -----
From: Hes Siemelink <[EMAIL PROTECTED]>
To: James Users List <[EMAIL PROTECTED]>
Cc: 
Sent: 10/07/2004 4:52AM EDT
Subject: RE: weird TOP err in pop server

Reading the RFC I would say that the server should either say +OK or -ERR. If the 
server says +OK it should provide the entire message.
The client would regard the -ERR as part of the message and wait for more.

>From RFC 1939:

RETR msg

         Arguments:
             a message-number (required) which may NOT refer to a
             message marked as deleted

         Restrictions:
             may only be given in the TRANSACTION state

         Discussion:
             If the POP3 server issues a positive response, then the
             response given is multi-line.  After the initial +OK, the
             POP3 server sends the message corresponding to the given
             message-number, being careful to byte-stuff the termination
             character (as with all multi-line responses).

         Possible Responses:
             +OK message follows
             -ERR no such message

         Examples:
             C: RETR 1
             S: +OK 120 octets
             S: <the POP3 server sends the entire message here>
             S: .


-----Original Message-----
From: John Glorioso [mailto:[EMAIL PROTECTED] 
Sent: woensdag 6 oktober 2004 19:28
To: 'James Users List'
Subject: FW: weird TOP err in pop server

> Is there anyone that can address my questions?

My Outlook 2003 thought that your emails were spam and put them in the Junk Mail 
folder. Sorry...

        Hes.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to