Re: Using mimetype and file to guess content-type

"Sergey Poznyakoff" <[email protected]> Tue, 08 Jun 2021 10:53:50 +0200
Newsgroups gmane.comp.gnu.mailutils.bugs
Organization GNU.org.ua
Message-ID <[email protected]>
Jean Louis <[email protected]> ha escrit:

> $ file --mime-type test.gpg
> test.gpg: application/octet-stream

FWIW, on my system, taking an arbitrary gpg encrypted file, I get:

 $ file --mime-type transcript.gpg
 transcript.gpg: application/octet-stream

and

 $ file transcript.gpg
 transcript.gpg: PGP Elgamal encrypted session key - keyid: 7EF04638 56DFFBBA Elgamal Encrypt-Only 1024b.

That's using the recent file magic database.

> Do you think recognition would be "pretty" accurate?

Again, that depends entirely on the file database (in this case:
mime.types) in use.

Regards,
Sergey