Uploaded image for project: 'Tika'
  1. Tika
  2. TIKA-1602

Detecting standards-non-compliant emails as message/rfc822

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.10
    • mime
    • None

    Description

      Tika does not properly detect certain emails as `message/rfc822` if they're slightly standards-non-compliant and begin with `Status: ` as the first header. I've added `Status: ` as a magic detection line in tika-mimetypes.xml.

      This solves my problem and does not appear to cause unit test failures. I have not yet run the tika-batch tests.

      As further information, the emails that are processed incorrectly come from dumps directly from various US public officials' mailservers. The dumps, I believe since they're not intended to be transmitted over the wire, sometimes are slightly non-compliant.

      It's important to note that Tika (and the underlying library, James Mime4J) do properly parse these emails, despite the non-compliant header. The problem is getting Tika to detect the file as an email so that Mime4J gets chosen to parse it.

      Pull request on Github at https://github.com/apache/tika/pull/40

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            chrismattmann Chris A. Mattmann
            jeremybmerrill Jeremy B. Merrill
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified

                Slack

                  Issue deployment