procmail
[Top] [All Lists]

Re: HTML filter

2006-07-25 21:02:14
At 19:17 2006-07-25 -0700, Wm. Vance wrote:
Howdy folks;

The bcc: to procmail list was unnecessary.  If you're going to post to a 
list, post to it.

On my system, I've noted however, that about 99% of spam emails all use HTML,
or some few with rich text.

Is there a way to detect HTML/rich text, and send it to a particular file for
later processing/forwarding/trashing/etc?


:0
* ^Content-Type:.*text/html
{
         # text/html -- the message is in HTML format.  Fools!
         # We can search for specific mailers if we want, then default

         BOUNCEMSG="texthtml.msg"
         BOUNCESUBJ="HTML message submission was declined"

         # Include bounce handler code
         INCLUDERC=bouncer.rc
}



alternatley:

:0
* ^Content-Type:.*multipart
{
         # multipart -- an attachment of some nature.  Fools!
         # search for specific filenames, then default
         # regular multipart/alternative (html or richtext)
         :0H
         * ^Content-Type:.*multipart/alternative
         {
                 BOUNCEMSG="texthtml.msg"
         }

         BOUNCESUBJ="Your list submission was declined"

         # Include bounce handler code
         INCLUDERC=bouncer.rc
}




These were extracted from my seneschal filters (a majordomo front-end I 
wrote in procmail).  I've been swamped with other things, and haven't had 
the time to genericise the package and document it, but it's in use not 
only on my own servers, but on a large auto enthusiast site, with over 50K 
members, and has run well for the past five years (geez, I'm really lagging 
on rolling this package up...).

the bouncer.rc would be whatever code you want to manipulate the message - 
in my case, it uses variables from a list-specific options file to 
determine how to respond to different types of bounces (codes for which - 
and specific ruleset enabling are stuff I stripped out from the above 
before posting).

the scripts were written to reduce the workload for various listadmins who 
were drowning in HTML posts and nonmemember crap, etc.  Taking the time to 
respond to each post manually was annoying, and repeatedly explaining 
things to some AOLer was a waste as well.  Then there's the class of person 
who goes "gee, I haven't seen my post after 5 minutes, let's post it over 
and over and over until we do - each time virtually the same as the 
previous, then get indignant because our message didn't get through".  The 
auto-reply capabilities of the list pre-filter allowed for quick responses 
to users so they'd be advised of why their post didn't reach the list.

---
  Sean B. Straw / Professional Software Engineering

  Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
  Please DO NOT carbon me on list replies.  I'll get my copy from the list.


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>