procmail
[Top] [All Lists]

Creating a subject file

2002-08-07 16:00:51
Hello all,

New guy on the block, and have a quick/I hope easy question.  In my
procmailrc I have figured out how to delete emails from know spammers using
a file to hold the list.  I think that is lesson 1 when learning procmail.

Example

#killing off the list of spammers
:0
* ? formail -x"From" -x"From:" -x"Sender:" \
    -x"Reply-To:" -x"Return-Path:" -x"To:" \
    | egrep -is -f black.lst
/dev/null

black.lst has a bunch of emails, one after another.
rob(_at_)bestwebimage(_dot_)com
rob(_at_)emailbliss(_dot_)com
and(_at_)so_on(_dot_)com


My question is this...How can I do this for a list of subjects in a file
called badsubjects.lst.

Right now I do it this way, but I would rather not mess with the procmailrc
file every time I want to add a new subject.  I would also be able to remove
the linebuf I had to add to handle the large amount of subjects blocked.

My current example

#Subjects for deleting
TRASHSUB=".*Lose Weight.*\
|.*Toss The 9 to 5.*\
|.*A funny game.*\
|.*A good tool.*\
|.*A  new website.*\
|.*A  powful tool.*\
|.*A bunch more subjects are below this on my procmailrc.*"

#killing off the bad subjects
:0
* $^Subject: ($TRASHSUB)
/dev/null

thanks for the help...


Robert Campbell
Westcoast First Aid
Main:  800-640-5502
Direct:  408-390-3128
Fax:  408-904-5727
email:  rob(_at_)wcfirstaid(_dot_)com
Web:  www.wcfirstaid.com

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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