Hi,

On Qua, 12 Dez 2001 - 15:48 -0800, Denis Perelyubskiy wrote: | Em Qua, 12 Dez 2001 - 
15:48 -0800, Denis Perelyubskiy escreveu:
> hello,
> 
> i just got mail, its a jpeg image, but it comes under
> application/octet-stream. if i save it, then view with xv,
> it works fine. however, i would like to tell mutt to use a
> mailcap entry for this. i do have image/jpg, etc entries in
> mailcap. also, i think it would be a bad idea to define
> application/octet-stream to be handled by xv.
> 
> the question is, is it possible to tell mutt to view this
> particular attachment using some random mailcap rule?
> 
> also, if there is a better way of handling attachments, what
> is it?
>

I also had this same problem. Because I'm using procmail to filter my
messages I can apply a perl script to every message that contains an
attach with Content-Type= application/octet-stream and replace it for
the correct one. For now I'm just parsing the file extension, not any
file content header as I'm supposed to, but it works for me.

Here goes an example of the reg-exp:
s#^Content-Type: application/octet-stream;((\s)*name=".*\.jpe?g.*")#Content-Type: 
image/jpeg;$1#mgi

Regards,

-- 
Rodrigo Curado

Reply via email to