<div dir="ltr">This looks like zero-bytes are getting passed to Tika via dovecot.  I don't know enough about dovecot to figure out what's going on.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jul 30, 2022 at 7:51 PM PGNet Dev <<a href="mailto:pgnet.dev@gmail.com">pgnet.dev@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">i'm running<br>
<br>
        dovecot 2.3.19.1 + fts<br>
        tika-server-standard 2.4.1<br>
<br>
dovecot is feeding tika backend via fts_tika<br>
<br>
when dovecot passes data with *.eml attachments embedded, tika fails to correctly parse/extract content<br>
<br>
not clear if the issue is with tika, or what dovecot's passing in this case.<br>
<br>
other non-.eml attachments are fine.<br>
<br>
here's the current failing procedure,<br>
<br>
(1)<br>
create a simple pdf<br>
<br>
        enscript -p <a href="http://mime.ps" rel="noreferrer" target="_blank">mime.ps</a> /etc/mime.types<br>
        ps2pdf <a href="http://mime.ps" rel="noreferrer" target="_blank">mime.ps</a> mime.pdf<br>
<br>
(2)<br>
send an email *with* mime.pdf attachment to<br>
<br>
        echo "test" | mailx -s "test" -a ./mime.pdf <a href="mailto:testuser@example.com" target="_blank">testuser@example.com</a><br>
<br>
tika processes OK<br>
<br>
        journalctl -f -u tika<br>
                ...<br>
                Jul 30 19:09:24 mx-test tika[19682]: INFO  [qtp2112135199-30] 19:09:24,165 org.apache.tika.server.core.resource.TikaResource /tika (application/pdf)<br>
                ...<br>
<br>
save the just-received email with .pdf attachment as mime.eml<br>
<br>
(3)<br>
send an email with NO .pdf attachment<br>
save the just-received email with .pdf attachment as mime2.eml<br>
<br>
(4)<br>
send an email with mime.eml attachment, containing the embedded mime.pdf<br>
<br>
        echo "test" | mailx -s "test" -a ./mime.eml <a href="mailto:testuser@example.com" target="_blank">testuser@example.com</a><br>
<br>
tika fails to extract message/rfc822<br>
<br>
        journalctl -f -u tika | grep -v StatusLogger<br>
                ...<br>
                Jul 30 19:28:00 mx-test tika[20049]: INFO  [qtp2112135199-30] 19:28:00,834 org.apache.tika.server.core.resource.TikaResource /tika (message/rfc822)<br>
                Jul 30 19:28:00 mx-test tika[20049]: WARN  [qtp2112135199-30] 19:28:00,840 org.apache.tika.server.core.resource.TikaResource tika/: Text extraction failed (mime.eml)<br>
                Jul 30 19:28:00 mx-test tika[20049]: org.apache.tika.exception.ZeroByteFileException: InputStream must have > 0 bytes<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:153) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.apache.tika.parser.ParserDecorator.parse(ParserDecorator.java:152) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.apache.tika.parser.DigestingParser.parse(DigestingParser.java:55) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.apache.tika.server.core.resource.TikaResource.parse(TikaResource.java:352) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.apache.tika.server.core.resource.TikaResource.lambda$produceText$1(TikaResource.java:502) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.apache.cxf.jaxrs.provider.BinaryDataProvider.writeTo(BinaryDataProvider.java:177) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.apache.cxf.jaxrs.utils.JAXRSUtils.writeMessageBody(JAXRSUtils.java:1616) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.serializeMessage(JAXRSOutInterceptor.java:249) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.processResponse(JAXRSOutInterceptor.java:122) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleMessage(JAXRSOutInterceptor.java:84) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:90) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:265) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:247) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:79) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:190) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.eclipse.jetty.server.Server.handle(Server.java:516) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at <a href="http://org.eclipse.jetty.io" target="_blank">org.eclipse.jetty.io</a>.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at <a href="http://org.eclipse.jetty.io" target="_blank">org.eclipse.jetty.io</a>.FillInterest.fillable(FillInterest.java:105) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at <a href="http://org.eclipse.jetty.io" target="_blank">org.eclipse.jetty.io</a>.ChannelEndPoint$1.run(ChannelEndPoint.java:104) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:00 mx-test tika[20049]:         at java.lang.Thread.run(Thread.java:833) ~[?:?]<br>
                Jul 30 19:28:00 mx-test tika[20049]: ERROR [qtp2112135199-30] 19:28:00,845 org.apache.cxf.jaxrs.utils.JAXRSUtils Problem with writing the data, class org.apache.tika.server.core.resource.TikaResource$$Lambda$338/0x0000000800eb4a38, ContentType: text/plain<br>
<br>
(5)<br>
send an email with mime2.eml attachment, WITHOUT an embedded .pdf<br>
<br>
        echo "test" | mailx -s "test" -a ./mime.eml <a href="mailto:testuser@example.com" target="_blank">testuser@example.com</a><br>
<br>
again, tika fails to extract message/rfc822<br>
<br>
        journalctl -f -u tika | grep -v StatusLogger<br>
                ...<br>
                Jul 30 19:28:33 mx-test tika[20049]: INFO  [qtp2112135199-30] 19:28:33,607 org.apache.tika.server.core.resource.TikaResource /tika (message/rfc822)<br>
                Jul 30 19:28:33 mx-test tika[20049]: WARN  [qtp2112135199-30] 19:28:33,616 org.apache.tika.server.core.resource.TikaResource tika/: Text extraction failed (mime2.eml)<br>
                Jul 30 19:28:33 mx-test tika[20049]: org.apache.tika.exception.ZeroByteFileException: InputStream must have > 0 bytes<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:153) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.apache.tika.parser.ParserDecorator.parse(ParserDecorator.java:152) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.apache.tika.parser.DigestingParser.parse(DigestingParser.java:55) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.apache.tika.server.core.resource.TikaResource.parse(TikaResource.java:352) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.apache.tika.server.core.resource.TikaResource.lambda$produceText$1(TikaResource.java:502) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.apache.cxf.jaxrs.provider.BinaryDataProvider.writeTo(BinaryDataProvider.java:177) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.apache.cxf.jaxrs.utils.JAXRSUtils.writeMessageBody(JAXRSUtils.java:1616) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.serializeMessage(JAXRSOutInterceptor.java:249) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.processResponse(JAXRSOutInterceptor.java:122) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleMessage(JAXRSOutInterceptor.java:84) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:90) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:265) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:247) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:79) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:190) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.eclipse.jetty.server.Server.handle(Server.java:516) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at <a href="http://org.eclipse.jetty.io" target="_blank">org.eclipse.jetty.io</a>.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at <a href="http://org.eclipse.jetty.io" target="_blank">org.eclipse.jetty.io</a>.FillInterest.fillable(FillInterest.java:105) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at <a href="http://org.eclipse.jetty.io" target="_blank">org.eclipse.jetty.io</a>.ChannelEndPoint$1.run(ChannelEndPoint.java:104) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) ~[tika-server-standard-2.4.1.jar:2.4.1]<br>
                Jul 30 19:28:33 mx-test tika[20049]:         at java.lang.Thread.run(Thread.java:833) ~[?:?]<br>
                Jul 30 19:28:33 mx-test tika[20049]: ERROR [qtp2112135199-30] 19:28:33,630 org.apache.cxf.jaxrs.utils.JAXRSUtils Problem with writing the data, class org.apache.tika.server.core.resource.TikaResource$$Lambda$338/0x0000000800eb4a38, ContentType: text/plain<br>
<br>
(6)<br>
submit mime.eml directly to tika<br>
<br>
        curl -T ./mime.eml <a href="http://127.0.0.1:9998/tika" rel="noreferrer" target="_blank">http://127.0.0.1:9998/tika</a><br>
        journalctl -f -u tika | grep -v StatusLogger<br>
                ...<br>
                Jul 30 19:30:08 mx-test tika[20049]: INFO  [qtp2112135199-34] 19:30:08,073 org.apache.tika.server.core.resource.TikaResource /tika (autodetecting type)<br>
<br>
(7)<br>
submit mime2.eml directly to tika<br>
<br>
        curl -T ./mime2.eml <a href="http://127.0.0.1:9998/tika" rel="noreferrer" target="_blank">http://127.0.0.1:9998/tika</a><br>
        journalctl -f -u tika | grep -v StatusLogger<br>
                ...<br>
                Jul 30 19:30:52 mx-test tika[20049]: INFO  [qtp2112135199-30] 19:30:52,349 org.apache.tika.server.core.resource.TikaResource /tika (autodetecting type)<br>
<br>
(8)<br>
where,<br>
<br>
        cat mime.eml<br>
                Return-Path: <<a href="mailto:msmtp@pgnd.example.com" target="_blank">msmtp@pgnd.example.com</a>><br>
                Delivered-To: <a href="mailto:testuser@example.com" target="_blank">testuser@example.com</a><br>
                ...<br>
                From: <a href="mailto:msmtp@pgnd.example.com" target="_blank">msmtp@pgnd.example.com</a><br>
                Date: Sat, 30 Jul 2022 18:53:38 -0400<br>
                To: <a href="mailto:testuser@example.com" target="_blank">testuser@example.com</a><br>
                Subject: test<br>
                User-Agent: Heirloom mailx 12.5 7/5/10<br>
                Content-Type: multipart/mixed;<br>
                 boundary="=_62e5b672.wAyBX+sGMbS7ZcNv8O/A1QeYuseaJ2NDRf8hfdbm/x8Vayp+"<br>
                Message-Id: <<a href="mailto:4LwKS35QWSzWf3Q@mx-test.example.com" target="_blank">4LwKS35QWSzWf3Q@mx-test.example.com</a>><br>
<br>
                This is a multi-part message in MIME format.<br>
<br>
                --=_62e5b672.wAyBX+sGMbS7ZcNv8O/A1QeYuseaJ2NDRf8hfdbm/x8Vayp+<br>
                Content-Type: text/plain; charset=us-ascii<br>
                Content-Transfer-Encoding: 7bit<br>
                Content-Disposition: inline<br>
<br>
                test<br>
<br>
                --=_62e5b672.wAyBX+sGMbS7ZcNv8O/A1QeYuseaJ2NDRf8hfdbm/x8Vayp+<br>
                Content-Type: application/pdf<br>
                Content-Transfer-Encoding: base64<br>
                Content-Disposition: attachment;<br>
                 filename="mime.pdf"<br>
<br>
                JVBERi0xLjQKJcfsj6IKJSVJbnZvY2F0aW9uOiBwYXRoL2dzIC1QLSAtZFNBRkVSIC1kQ29t<br>
                ...<br>
                Rgo=<br>
<br>
                --=_62e5b672.wAyBX+sGMbS7ZcNv8O/A1QeYuseaJ2NDRf8hfdbm/x8Vayp+--<br>
<br>
and,<br>
<br>
        cat mime2.eml<br>
                Return-Path: <<a href="mailto:msmtp@pgnd.example.com" target="_blank">msmtp@pgnd.example.com</a>><br>
                Delivered-To: <a href="mailto:testuser@example.com" target="_blank">testuser@example.com</a><br>
                ...<br>
                From: <a href="mailto:msmtp@pgnd.example.com" target="_blank">msmtp@pgnd.example.com</a><br>
                Date: Sat, 30 Jul 2022 19:14:59 -0400<br>
                To: <a href="mailto:testuser@example.com" target="_blank">testuser@example.com</a><br>
                Subject: test<br>
                User-Agent: Heirloom mailx 12.5 7/5/10<br>
                Content-Type: text/plain; charset=us-ascii<br>
                Content-Transfer-Encoding: 7bit<br>
                Message-Id: <<a href="mailto:4LwKwh5brVzWf3Q@mx-test.example.com" target="_blank">4LwKwh5brVzWf3Q@mx-test.example.com</a>><br>
<br>
                test<br>
<br>
</blockquote></div>