On Tue, Jun 06, 2017 at 02:03:34AM +0200, Andries E. Brouwer wrote: > On Tue, Jun 06, 2017 at 09:15:23AM +1000, Cameron Simpson wrote: > > On 05Jun2017 22:12, Andries E. Brouwer <andries.brou...@cwi.nl> wrote: > >> A moment ago I sent 8 images as attachment with mutt. > >> Three were garbled on arrival. > > > > Just for some more context, did the files lack a useful file extension? > > No mime-type was known. No mechanism using mime-types could work.
That can't be true. You said you attached the files... they had to be on disk and had to have names. Even if your image format is proprietary and lacks an official standard, you can manually set its MIME type to application/octet-stream. Mutt provides you the ability to do this from the attachment menu. You can edit /etc/mime.types or your local mime.types and add a suitable entry for your proprietary file types to avoid having to do it manually. > Using information when it is available is a separate discussion. > In the present discussion one only has the file contents. This also is not true. When you asked Mutt to attach the file, you had to tell it the name of the file. If you specified a bad filename or didn't configure your mime types properly that's user error. I'm not opposed to using libmagic for this, but I actually think the heueristic code should be removed entirely from Mutt. Message bodies should be assumed to be text, and attachments are assumed to be NOT text, by virtue of them not being message bodies. Their types should be determined via the standard MIME mechanisms. If those mechanisms fail--for whatever reason--assume application/octet-stream and move on. That guarantees the file will arrive unmolested and obviates the need for some mostly pointless code in Mutt to try to guess what the user was thinking. -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0xDFBEAD02 -=-=-=-=- This message is posted from an invalid address. Replying to it will result in undeliverable mail due to spam prevention. Sorry for the inconvenience.
pgpQskmuUh8WN.pgp
Description: PGP signature