remove eml magic too common causing false positives
MODIFY
tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml
tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml
<match value="\nUser-Agent:" type="string" offset="0:1024"/>
<match value="\nX-Mailer:" type="string" offset="0:1024"/>
<match value="\nX-Originating-IP:" type="stringignorecase" offset="0:1024"/>
- <match value="\nX-" type="string" offset="0:1024"/>
<match value="\nDKIM-" type="string" offset="0:1024"/>
<match value="\nARC-" type="string" offset="0:1024"/>
</match>

MODIFY
tika-core/src/test/java/org/apache/tika/mime/MimeDetectionTest.java
tika-core/src/test/java/org/apache/tika/mime/MimeDetectionTest.java
@@ -260,4 +260,12 @@ public class MimeDetectionTest {
metadata.set(TikaCoreProperties.RESOURCE_NAME_KEY, "testingTESTINGtesting");
assertEquals(helloXType, MIME_TYPES.detect(new ByteArrayInputStream(helloWorld), metadata));
}
+
+ /**
+ * Test for TIKA-3771.
+ */
+ @Test
+ public void testPNGWithSomeEmlHeaders() throws IOException {
+ testFile("image/png", "test-pngNotEml.bin");
+ }
}

ADD
tika-core/src/test/resources/org/apache/tika/mime/test-pngNotEml.bin
tika-core/src/test/resources/org/apache/tika/mime/test-pngNotEml.bin
Binary files /dev/null and b/tika-core/src/test/resources/org/apache/tika/mime/test-pngNotEml.bin differ

TIKA-3771: remove eml magic too common causing false positives