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

Nick Burch commented on TIKA-2037:
----------------------------------

I've just tried with a 1.14 snapshot build, and both are detected as 
{{message/rfc822}} there, so it looks like we may have already fixed at least 
part of this on trunk

Attachment extraction is failing with a different error, from within Tika 
itself so likely our own fault:
{code}
Exception in thread "main" org.apache.tika.exception.TikaException: Failed to 
parse an email message
        at org.apache.tika.parser.mail.RFC822Parser.parse(RFC822Parser.java:81)
        at 
org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
        at 
org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
        at 
org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:120)
        at org.apache.tika.cli.TikaCLI$OutputType.process(TikaCLI.java:191)
        at org.apache.tika.cli.TikaCLI.process(TikaCLI.java:480)
        at org.apache.tika.cli.TikaCLI.main(TikaCLI.java:145)
Caused by: java.io.IOException: mark/reset not supported
        at java.io.InputStream.reset(InputStream.java:347)
        at 
org.apache.tika.parser.microsoft.POIFSContainerDetector.detect(POIFSContainerDetector.java:436)
        at 
org.apache.tika.detect.CompositeDetector.detect(CompositeDetector.java:77)
        at 
org.apache.tika.cli.TikaCLI$FileEmbeddedDocumentExtractor.parseEmbedded(TikaCLI.java:1021)
        at 
org.apache.tika.parser.mail.MailContentHandler.body(MailContentHandler.java:182)
        at 
org.apache.james.mime4j.parser.MimeStreamParser.parse(MimeStreamParser.java:133)
        at org.apache.tika.parser.mail.RFC822Parser.parse(RFC822Parser.java:78)
        ... 6 more
{code}

> Problems with email attachments
> -------------------------------
>
>                 Key: TIKA-2037
>                 URL: https://issues.apache.org/jira/browse/TIKA-2037
>             Project: Tika
>          Issue Type: Bug
>          Components: detector, parser
>    Affects Versions: 1.13
>         Environment: Eclipse, Java 8
>            Reporter: Eli Trucco
>            Priority: Minor
>         Attachments: CameraCalibration.eml, Exkursion.eml
>
>
> I stumbled across a couple of problems while parsing and extracting 
> attachments from .eml files from Thunderbird. Some of them are wrongly 
> identified (as text/html, or application/xhtml+xml) and in a lot of them, the 
> attachments are not detected. I tried to parse 20 random eml files with 
> attachments (pdf,txt,html,etc), and at least 10 of them are either identified 
> as html, or correctly identified as rfc822 but the attachments are not 
> extracted. I tried the same files using TikaCLI -z option with the same 
> result.
> What I did: I extended the class ParsingEmbeddedDocumentExtractor to extract 
> and store the attachments somewhere else (exactly as shown in this example 
> code 
> https://github.com/apache/tika/blob/master/tika-example/src/main/java/org/apache/tika/example/ExtractEmbeddedFiles.java).
>  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to