Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-431

Line ending and CRLF.CRLF issues in POP3 and SMTP

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.3.0
    • Component/s: None
    • Labels:
      None

      Description

      We were using a message size not inluding the last CRLF.

      The main problem is that when we receive a message from SMTP we remove the first CRLF of the ending separator CRLF.CRLF but we shouldn't (rfc says that the first CRLF is to be considered part of the message).

        Activity

        Hide
        bago Stefano Bagnara added a comment -

        Please note that the 2 patches (to pop3handler and to datacmdhandler) fix the problem but this will break backward compatibility because message saved by previous james wouldn't be handled correctly by pop3.

        What should we do?
        Should we better revert to save messages without the last line ending and simply add one more lineending every time we read it (via mimemessagewrapper inputstream?)

        Should we simply add "2" to the getMessageSize and revert the out.println(""); in the pop3 server?

        Furthermore we should check wether this change the remotedelivery behaviour.

        Show
        bago Stefano Bagnara added a comment - Please note that the 2 patches (to pop3handler and to datacmdhandler) fix the problem but this will break backward compatibility because message saved by previous james wouldn't be handled correctly by pop3. What should we do? Should we better revert to save messages without the last line ending and simply add one more lineending every time we read it (via mimemessagewrapper inputstream?) Should we simply add "2" to the getMessageSize and revert the out.println(""); in the pop3 server? Furthermore we should check wether this change the remotedelivery behaviour.
        Hide
        bago Stefano Bagnara added a comment -

        Workaround applied.

        Show
        bago Stefano Bagnara added a comment - Workaround applied.
        Hide
        danny@apache.org Danny Angus added a comment -

        Closing issue fixed in released version.

        Show
        danny@apache.org Danny Angus added a comment - Closing issue fixed in released version.

          People

          • Assignee:
            bago Stefano Bagnara
            Reporter:
            bago Stefano Bagnara
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development