Re: more on howto decode (or more FUBAR mails?)
Henry Nelson wrote:
> The mime information section before the attachment looks like:
> Content-Type: application/msword;
> name="my doc.doc"
>
> BUT the first few lines of the raw attachment viewed in nvi looks like
> the following. Isn't that a rich text file, and not a Word document?
Shame on Microsoft clients for using the wrong MIME type.
That's indeed a RTF file, of type text/rtf.
Solution #1: educate your correspondents not to send you mail with
stupid attachments, moreso ones with the wrong mime type.
Solution #2: write an exception for this particular case yourself.
Something like:
.mailcap:
application/msword; doc-or-rtf; copiousoutput
bin/doc-or-rtf:
#!/bin/sh
f=`mktemp`
cat > $f
antiword $f ||
unrtf $f | w3m -ppc 10 -T text/html -no-cookie -dump -s
rm $f
Put your favorite rtf- and doc-to-text converters there.
Toby
--
Signed/encrypted mail welcome. GPG/PGP Key-Id: 0x15C5C2EA