On Tue, Oct 31, 2000 at 08:24:15PM +0100,
[EMAIL PROTECTED] ([EMAIL PROTECTED]) said:
> Hello,
> 
> According to Mutt's manual, I've put this line in my .mailcap file to read
> HTML-attachments without running X :
> 
> text/html; lynx -force_html -dump %s | less

While this works, you might want to use

text/html; lynx -dump -force_html %s; copiousoutput

which will use mutt's internal pager (or whatever you set pager to).
> 
> It works generally fine, but sometimes HTML-files aren't recognized by Mutt.
> I didn't find (or understand...) in the mailcap manpage how are matched the
> files and the correspondant entries in the 1rst fields of mailcap's lines.
> Is it by using the "file" command ?

Nope, it looks at the attachment type, as set by the sender's MUA.

> By exemple, I've got a HTML-attachment seen as applica/octet-stream : 

> 
> 1 <no description>                               [text/plain, quoted, 1,6K]
> 2 petition.eurolinux.org.html (Internet-Do[applica/octet-stre, quoted, 23K]
>     
> ...and the file is displayed as raw text, with all the tags.

Right.  It was sent as application/octet-stream, so mutt doesn't know
what to do with it.

With more recent versions of mutt you can use the edit-type
function (bound to ^E in the attach menu by default) to change it to
text/html--I don't think 1.0 has that, though.  This is what I
typically do.

Someone wrote a octet-stream viewer which tries to figure out what
type it should be (I forget if it uses the file extension or the file
command--probably a combination of both with other magic) to do the
Right Thing.  You might want to search the archives for it, or someone
else might pipe up.

Or you could write a procmail recipe to fix this.

Or you could convince the people sending this to fix their MUA.

Or perhaps the horse will learn to sing.

-- 
Jim Toth
[EMAIL PROTECTED]

Reply via email to