[pmmail-list] Filter out HTML

Tim Roberts pmmail-list@blueprintsoftwareworks.com
Wed, 17 Sep 2003 10:57:47 -0700


On Wed, 17 Sep 2003 10:49:36 -0700 (MST), James Moe wrote:

>On Wed, 17 Sep 2003 09:50:03 -0500, Larry Alkoff wrote:
>
>>Should I use a multipart filter for both?
>>Are there any other types to filter out?
>>
>  Try this (of the "complex" variety):
>
>(  header = "text/html"
> | header = "multipart/alternative"
> | header = "multipart/mixed"
> | header = "multipart/related"
>)
>&
>!(message = "Content-Type: text/plain"
> | header = "a-good-guy.org"
> | --other desirable hosts--
>)
>
>  The second part is basically a whitelist.
>  This filter captures about 95% of the html spam. There are a few spams 
>that have an empty text/plain section that slip past.

I'm not sure I can suggest a better way to do it, but I would like to point 
out that a "multipart/alternative" section virtually always consists of one 
"text/html" and one "text/plain" part.  That's the purpose of 
"multipart/alternative": "this message consists of several parts of different 
types, all of which are just different ways of saying the same thing".

"multipart/mixed" and "multipart/related", on the other hand, usually 
indicate that there is an attachment.


--
- Tim Roberts, timr@probo.com
  Providenza & Boekelheide, Inc.


- pmmail-list - The PMMail Discussion List ---------------------------
To POST to the list, send your message to:
pmmail-list@blueprintsoftwareworks.com

To UNSUBSCRIBE, send a message to mdaemon@bmtmicro.com 
with the first line of the message body being...
UNSUBSCRIBE pmmail-list@blueprintsoftwareworks.com
---------------------------------------------------------------------