[ 
https://issues.apache.org/jira/browse/PROTOCOLS-106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17410161#comment-17410161
 ] 

Benoit Tellier commented on PROTOCOLS-106:
------------------------------------------

This needs to be tested. I have some POP3 customers around.

CC [~kotto]

> CRLFTerminatedInputStream does not do what it is supposed to. Missing CR if 
> last char is \n Outlook hangs forever DL messages
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PROTOCOLS-106
>                 URL: https://issues.apache.org/jira/browse/PROTOCOLS-106
>             Project: James Protocols
>          Issue Type: Bug
>          Components: pop3
>    Affects Versions: 1.6.2
>            Reporter: Steve
>            Assignee: Eric Charles
>            Priority: Major
>
> A message transfer to a pop3 client is finished when the server issues
> CRLF DOT CRLF
> However this is not always the case with the current implementation.
> The method
>  private void calculateExtraData() {
> 109        if (last == '\n') {
> 110            extraData = null;
> 111        } else if (last == '\r') {
> 112            extraData = new byte[1];
> 113            extraData[0] = '\n';
> 114        } else {
> 115            extraData = new byte[2];
> 116            extraData[0] = '\r';
> 117            extraData[1] = '\n';
> 118        }
> 119
> 120    }
> Does not factor in when the last byte is "\n" but the one before is NOT "\r" 
> - meaning the resulting output to the client is actually
> LF DOT CRLF
> Outlook will hang forever because it does not see a termination of the 
> message. (See POP3 RFC - it MUST be CRLF DOT CRLF - Thunderbird is not as 
> strict tho)
> A java MimeMessage is not guaranteed to be canoniclized by CRLF - see 
> http://www.oracle.com/technetwork/java/faq-135477.html#repres
> The current workaround is to implement Mailbox and overwrite  public 
> InputStream getMessage(String uid) to always make sure the message stream 
> ends with a CRLF.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to