Peter J. Holzer wrote:
I was under the impression that MIMEDefang can do this. But I'm
afraid my users wouldn't like it, so I never looked into it closely.
That said I think this is very easy to implement:

Check if a mime entity is multipart/alternative with a text part: If
it is, replace it with the text part.

I know MD can do this much *very* easily -- there's a built-in function, remove_reduntant_html_parts, that you can call in filter_end. All you have to do is uncomment it in the example filter.

Otherwise, if it is HTML, filter it through w3m, lynx, or some other
html to text converter.

This can probably be done using action_external_filter, but you still need to figure out which parts to convert and which to discard, pick a parser (as Matthew pointed out, there can be security concerns here), change the mime type, etc.


--
Kelson Vibber
SpeedGate Communications <www.speed.net>

_______________________________________________
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users

Reply via email to