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

HBase mailbox may be blocked permanently by a malformed email

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • Trunk, 3.0-beta4
    • None
    • POP3Server
    • POP3 mailbox access with the mailbox managed by HBase

    Description

      I have discovered the problem when working on a company-specific fork of James but when I verified the trunk code I believe I saw the same problem there too.

      org.apache.james.mailbox.hbase.HBaseUtils.messageMetaFromResult() calls getProperty() method like this:

                  //get message properties
                  if (Bytes.startsWith(keys[i].getQualifier(), PREFIX_PROP_B)) {
                      propList.add(getProperty(keys[i].getValue()));
                  } else if (Bytes.startsWith(keys[i].getQualifier(), PREFIX_SFLAGS_B)) {
      

      getProperty() method throws RuntimeException (which is a bad practice, in my opinion, in this case). This exception is not handled anywhere close enough in this method or in the caller. As result, when a message in the mailbox cannot be parsed, then the mailbox becomes permanently inaccessible until that message is removed manually. Any attempt to authenticate with, for example, POP3 server results in failure because the mailbox cannot be read.

      I am receiving such messages from time to time so the problem is real.

      I think the best solution would be either to skip the property and move to the next one.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ngrigoriev@gmail.com Nikolai Grigoriev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: