Lyndon Nerenberg writes: > What we really ought to do is derive the MIME type from the file contents. > I realize this means bundling an implementation of magic, but I think it's > worth the price. There are several license-compatible implementations out > there that could be used as a starting point.
Send runs the file command on files. However, it only does this to get additional descriptive information. Send (in make_mime_composition_file) tests for the existence of a known suffix, and then picks text/plain or application/octet-stream depending on whether or not there are non-ASCII characters in the content (see earlier complaints). It could be changed to run file if there was no known suffix. BUT, finding the file type does not give you the mime type. There's the rub. I guess that I think that this is pretty much a non-issue. I believe (I didn't do this part of the work) that we import /etc/mime.types, so we likely have the mime types for all of the file types that file would recognize. There is also the issue that if types are not in the profile we can send 'em but not receive 'em. Jon _______________________________________________ Nmh-workers mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/nmh-workers
