sindresorhus / file-type

Detect the file type of a file, stream, or data
MIT License
3.64k stars 345 forks source link

Add support for .eml aka message/rfc822 #626

Open davidpanic opened 7 months ago

davidpanic commented 7 months ago

When trying to recognize .eml files undefined is returned instead of { "ext": "eml", "mime": "message/rfc822" } which obviously means the format is not recognized. running the same file through the linux file utility returns RFC 822 mail, ASCII text, with CRLF line terminators.

Here is how the file utility recognises the files.

Since there's many more magic file definitions in the Magdir, it might be a good idea to support those and expand the list of supported types to a way bigger set than currently supported.