Subject: Re: Pine Misidentifies Excel Files as applictaion/MSWORD

From: Ed Arnold <[email-masked]>
Date: Wed, 2 Feb 2000 12:49:58 -0700 (MST)

I've been having a problem similar to Mike Tibor's (per his message
below).  I'm running pine-4.10 on a solaris-7 machine.  For the
purpose of mailing .au or .wav sound files, I have the following in
my .mime.types file:

type=audio/basic        exts="au,snd"           desc="ULAW audio"
type=audio/x-wav        exts="wav"              desc="WAV audio"

... with corresponding lines in my .mailcap:

audio/basic; xplay %s; description="ulaw sound file via xplay"
audio/x-wav; xplay %s; description="wav sound file via xplay"

I can run "pine -attach puke.au ..." and the attachment Content-Type
header is correct; I get the expected audio result when I 'V' the file
in pine.

However, if I run "pine -attach mrrogers.wav ..." the Content-Type
header is messed up; it says "application/octet-stream" in spite of
the .mime.types definition for WAV files.  I don't have the 4.10 source
immediately available.  Does anyone know if there is a way to force pine
to take the .mime.types definition over whatever other method it is using
to (incorrectly) set the Content-Type for .wav files?  Or, is there
someone on this list who could put the .wav definition in their .mime.types
and then use "pine -attach" to mail me a .wav file, so I can see if that
is any better?

> I've got a small server running Red Hat 6.0 Linux with pine-4.10, and I
> had a user complain that MS Excel attachments are being identified as
> "APPLICATION/MSWORD".  (These are Excel 97 documents)
> 
> I spent the better part of today scouring mime.types and mailcap
> information, and pulling my hair out because I couldn't find how pine
> comes to the conclusion that a file with a .xls extension should get a
> mime type of "APPLICATION/MSWORD".
> 
> Finally I started digging through the source for pine4.10, and in
> ./pine/send.c it appears that pine checks the first few bytes of the file
> for a couple of common filetypes.  I hope this isn't taken the wrong way,
> but why on earth are these certain mime types hard-coded into pine?  Is
> there some speed advantage to this?
> 
> I tried adding an entry in the mime.types file to have the xls extension
> treated as plain application/octet-stream, and pine seems to pick up
> on this with the message:
> 
>  [File /home/tibor/training.xls attached as type APPLICATION/octet-stream]
> 
> However, when I send the test message to another account which I check
> with Netscape 4.61, I see:
> 
>        Content-Type: APPLICATION/MSWORD; name="training.xls"
> 
> I tried searching the pine-info archives to see if this has come up
> before, but I came up empty-handed.
> 
> If anyone has any ideas, or if 4.21 handles things in a better manner, I'd
> love to hear about it.
> 
> Thanks,
> Mike
> -- 
> Mike Tibor         Univ. of Alaska Anchorage    (907) 786-1001 voice
> LAN Technician     Consortium Library             (907) 786-6050 fax
> [email-masked]       http://www.lib.uaa.alaska.edu/~tibor/
> http://www.lib.uaa.alaska.edu/~tibor/pgpkey  for PGP public key