> From: "roger peppe"

> one thing that has bugged me in the past: upas relies on file -m to
> determine the type of attachments, but file only reads the first block
> of the file, so if you've got a utf-8 file with the first non-ascii character
> beyond the 8192nd byte, you get corrupted mail.
> IMHO for the -m option, file should probably read the whole file,
> but there are probably good reasons for not doing so.


i don't think this is correct.

upas/marshal uses file -m to determine the mime type, e.g.
"text/plain" or "text/html" or whatever. it tests for bucky bits
in the entire body to determine if it is utf-8 or us-ascii.
(cf. upas/marshal/marshal.c:^/body) it uses this information
to emit a charset.

(obviously there's a whole in this nulls and bad utf can cause
this algorithm to go pear shaped.)

upas/nedmail also uses file -m. but since upas/fs does
character set translation, i don't see how using file could
be to blame for corrupt email.

- erik