On 2017-06-12 18:13:58 -0500, Derek Martin wrote:
> 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.

I disagree: those mechanisms will typically fail on what is
actually arbitrary text, because text does not correspond to
a file format. Very often it does not have a file extension.

> 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.

Even if binary data is sent as valid text (BTW, any binary data
can be regarded as valid text in some user-defined character set),
it should not arrive as unmolested. I mean that in any case, the
user should be able to choose text/plain for "Content-Type" and
be sure that no corruption occurs. It is up to Mutt to choose an
adequate "Content-Transfer-Encoding".

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Reply via email to