procmail
[Top] [All Lists]

Re: Deleting Unsubscribe mails

1996-10-28 09:41:40
On Mon, 28 Oct 1996 07:54:15 -0800 (PST), "Z.B." <zachb(_at_)netcom(_dot_)com>
wrote:
On one of the lists that I subscribe to, there are at least 4 or 5 people 
each day that send unsubscribe messages to the list.  Worse, none of them 
can spell it right.  "unsiscribe", "unsuvscribe", etc.  I've been able to 
filter them out if they put it in the header, but I don't know what to do 
to get Procmail to search the message body.  How can I do this?  

Here's a part of my multi-line defense agains unsubscribes. (I wish
the maintainers of +this+ list would set up something like this at the
list server end.)


# Unsubscribes

:0:
* ! ^FROM_DAEMON
* <2000
* ^Subject:[    ]+(pl(e(ez|as)e?|s) )?((un)?sub?s?cribe|sign( me | )?off|\
        cancel sub|remove +[^ ]+(_at_)[^ ]+\.[^ ]+)
$HOME/scratch/inbox/unsubscribe

:0BD:   # D == case sensitive, B == scan message body
* ! ^FROM_DAEMON
* <2000
* ^(UNSUB?SCR?IBE|SIGN ?OFF|REMOVE)
$HOME/scratch/inbox/unsubscribe

:0B:
* ! ^FROM_DAEMON
* <1600
* ^ *unsub?scr?ibe
$HOME/scratch/inbox/unsubscribe

# No subject line
:0HB:   # H == scan header (for no Subject); B == scan message body
* ! ^FROM_DAEMON
* <2000
* !^Subject: .*
* (pl(e(ez|as)e?|s) )?(unsub?(scr?ibe)?|sign ?off)
$HOME/scratch/inbox/unsubscribe


These have evolved over time so now that I look at them again all in
one place, it's obvious that they could be, er, fixed a little bit.
Nevertheless, hope this can help somebody. 
  You might want to exclude the check for message size. It has never
appeared to be too high but on the other hand, a lot of the normal
messages I receive are below 2000 bytes, too.

If you need to know how to set up a mail filter or defend against 
emailbombs, send me a message with the words "get helpfile" (without the 
" marks) in the SUBJECT: header, *NOT THE BODY OF THE MESSAGE!*  I have 

(Scanning of body -- B option -- could be helpful here as well :-)

/* era */

-- 
See <http://www.ling.helsinki.fi/~reriksso/> for mantra, disclaimer, etc.
* If you enjoy getting spam, I'd appreciate it if you'd register yourself
  at the following URL:  <http://www.ling.helsinki.fi/~reriksso/spam.html>

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