On Wed, 9 Nov 2016, Chris Bamford wrote:
<mime-type type="message/rfc822">
 <magic priority="50">
   <match value="Status:" type="string" offset="0"/>
   …
     <match value="Message-ID:" type="string" offset="0:8192"/>
   </match>
 </magic>
 ...

</mime-type>

Does offset="0:8192" mean match 'Message-ID:' anywhere in the first 8192 bytes?

Yup, that's it. If that is found, and nothing with a priority score of higher than 50 also matches, it'll return that type. If a higher priority matched, that other one will win.

(There's also some bits for if the extension matches a type in the same family, eg for specialising)

If so, I'm not sure it is working properly as I have some eml files with this string near the beginning (but not at byte offset 0) where it does not match. Is there some other logic involved which I am missing?

If you can share a small file that shows it, we can take a look for you.

Nick

Reply via email to