[TriLUG] Filtering and Bouncing HTML Mail

John Beimler john at radiomind.com
Thu May 15 07:29:54 EDT 2003


Jonathan Hassell wrote:

>I am looking for a way to configure Exim to detect whether a message is in
>HTML or in plain text, and if it is HTML, to bounce it back to the sender
>with an error message.  I could also do this with SpamAssassin if it's
>possible.
>
>I'd also prefer it to be configurable per domain (I host several on this
>box), but that's not 100% required.
>
>Has anybody done this? Does anyone have ideas?
>
>  
>
It's doable with procmail

this will strip html email, so you would need to change it to just find 
it, and report back (strip_html.pl) attached.

:0 fw
* ^Content-type:.*boundary
* <102400
|/usr/local/bin/strip_html.pl

and then you just go grab Ben's super cool pretend procmail bouncer, 
which he wrote about here:
http://www.trilug.org/pipermail/trilug/Week-of-Mon-20030120/013773.html


Peace.

john
-------------- next part --------------
A non-text attachment was scrubbed...
Name: strip_html.pl
Type: application/x-perl
Size: 1722 bytes
Desc: not available
URL: <http://www.trilug.org/pipermail/trilug/attachments/20030515/bad62d7a/attachment.bin>


More information about the TriLUG mailing list