James Server
  1. James Server
  2. JAMES-241

fail gracefully upon large messages/attachments

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.3
    • Fix Version/s: 3.0-M2
    • Component/s: POP3Server
    • Labels:
      None
    • Environment:
      redhat 9

      Description

      I am aware of the <maxmessagesize> to prevent too large messages getting into james and the corresponding fast-fail discussions (http://marc.theaimsgroup.com/?l=james-user&m=108040337403426&w=2, http://nagoya.apache.org/jira/browse/JAMES-134).
      When uploading via a web-mail interface into my MySQL mailstore, I got messages up to 14MB through the system.

      However, I would like to know what is the maximum I can safely handle.
      I didn't find anything documented.
      I did increase the heap for my JVM in phoenix.sh with PHOENIX_OPTS=-Xmx512m, but on a 45MB attachments, it fails with little useful error output:
      <<[root@myhost logs]# less connections-2004-04-01-09-24.log
      01/04/04 09:24:35 ERROR connections: Error handling connection
      java.lang.OutOfMemoryError>>

      Especially, since my adaptation of the MySQL mailstore also explicitly stores attachment sizes, I could stop that message from being pushed through the pop3 server before it is in memory and causes problems and then could issue error message saying (e.g. "message ABC too large - please retrieve via webMail interface" instead of the current <<
      Task 'sPop test account - Receiving' reported error (0x800CCC0F) : 'The connection to the server was interrupted. If this problem continues, contact your server administrator or Internet service provider (ISP).'>> I see in my MUA)

        Issue Links

          Activity

          Ralf Hauser created issue -
          Danny Angus made changes -
          Field Original Value New Value
          Priority Major [ 3 ] Critical [ 2 ]
          Type Improvement [ 4 ] Bug [ 1 ]
          Hide
          Danny Angus added a comment -

          I see that it is only during a POP get, which is less serious than I had thought, but still a vulnerability

          Show
          Danny Angus added a comment - I see that it is only during a POP get, which is less serious than I had thought, but still a vulnerability
          Danny Angus made changes -
          Priority Critical [ 2 ] Major [ 3 ]
          Hide
          Danny Angus added a comment -

          I think this may be related.

          Show
          Danny Angus added a comment - I think this may be related.
          Danny Angus made changes -
          Link This issue duplicates JAMES-134 [ JAMES-134 ]
          Hide
          Ralf Hauser added a comment -

          got a little bit further: PHOENIX_OPTS as described in the phoenix.sh is never used while really
          PHOENIX_JVM_OPTS=-Xmx512m works.
          ==> this way, I could retrieve 44 MB !!!

          although, I first tried to sign it (openssl) that process wouldn't finish before the MUA timed out ...

          Show
          Ralf Hauser added a comment - got a little bit further: PHOENIX_OPTS as described in the phoenix.sh is never used while really PHOENIX_JVM_OPTS=-Xmx512m works. ==> this way, I could retrieve 44 MB !!! although, I first tried to sign it (openssl) that process wouldn't finish before the MUA timed out ...
          Stefano Bagnara made changes -
          Assignee Stefano Bagnara [ bago ]
          Alan Cabrera made changes -
          Link This issue duplicates JAMES-134 [ JAMES-134 ]
          Alan Cabrera made changes -
          Link This issue duplicates JAMES-134 [ JAMES-134 ]
          Stefano Bagnara made changes -
          Fix Version/s Trunk [ 12312135 ]
          Hide
          Stefano Bagnara added a comment -

          Removed myself as assignee as I'm not willing to work on this in the near future. In the past 2 years I've applied some patches to increase the probability to be able to stream only the message without loading, but this still does not happen on every case.

          Show
          Stefano Bagnara added a comment - Removed myself as assignee as I'm not willing to work on this in the near future. In the past 2 years I've applied some patches to increase the probability to be able to stream only the message without loading, but this still does not happen on every case.
          Stefano Bagnara made changes -
          Assignee Stefano Bagnara [ bago ]
          Hide
          Norman Maurer added a comment -

          The POP3Server now use the new Mailbox api which can handle such emails without problems.

          Show
          Norman Maurer added a comment - The POP3Server now use the new Mailbox api which can handle such emails without problems.
          Norman Maurer made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Norman Maurer [ norman ]
          Fix Version/s 3.0-M2 [ 12315479 ]
          Fix Version/s Trunk [ 12312135 ]
          Resolution Fixed [ 1 ]
          Mark Thomas made changes -
          Workflow jira [ 27792 ] Default workflow, editable Closed status [ 12566706 ]
          Mark Thomas made changes -
          Workflow Default workflow, editable Closed status [ 12566706 ] jira [ 12582222 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          2402d 9h 13m 1 Norman Maurer 29/Oct/10 19:11

            People

            • Assignee:
              Norman Maurer
              Reporter:
              Ralf Hauser
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development