procmail
[Top] [All Lists]

Re: removing text from subject

2003-10-14 02:04:45
Chris Barnes wrote:
# Check to see if SpamAssassin at GKG.net marked it
# if so, put it into a folder named "Filtered"
:0:
* ^Subject:.\*\*\*\*\*SPAM\*\*\*\*\*
Spam/Filtered

Rather than just dump this into a different mbox, I would like to just
strip out the marker they add to the subject line (*****SPAM*****) so
that it's "clean" and leave it in my regular INBOX.

But I'm not sure of how to use procmail to simply remove that text.


Another option is to use something like this:

 :0 fhw
 * ^Subject:.(\*\*\*\*\*SPAM\*\*\*\*\*)\/.*
 | formail -I "Subject: $MATCH"


I discuss the extraction operator and $MATCH in my Procmail Quick
Start in the "Advance Recipes" section, which is here:

 <http://www.ii.com/internet/robots/procmail/qs/#advanced>

Also look at the "Using SpamAssassin" sections where I give some
recipes that do something like this.

-- 
Nancy McGough            <http://www.ii.com>            Infinite Ink
Writing about procmail, imap, pine, spam-deflexion strategies & more

_______________________________________________
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>