nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] whatnow: can't attach because no header fieldname was given.

2012-03-17 07:36:33
rfg wrote:

Please excuse me if this is old news... I myself didn't know about
it until today... but it would seem that the file(1) command on both
FreeBSD and Linux implements a -i option that nicely spits out an
appropriate MIME type for the file being examined.

Unfortunately, POSIX file's -i means something different (spit
out one of a very short list of short file types that aren't
what we want, see "man 1p file" on Linux).  And it doesn't have
an option to spit out the MIME type.  So we could use it, but
only with a configure check to determine that it does what we
need.  If not available, we could look for mime.types, and so
on.

I haven't looked to see if the attach command for whatnow is using
that or not, but certainly, if it is (or if it will, in the future),
then it would seem to me that whatnow itself would not even need to
make use of any file called "mime.types" (no matter where located).

Currently, we use the associations in the user's .mh_profile
and etc/mhn.defaults, which are greatly enhanced in the
upcoming nmh 1.5 as a result of your report.  Of course, it
would be much better to rely on system capabilities.  Some
day . . .

David

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>