procmail
[Top] [All Lists]

Re: removing text from subject

2003-10-14 01:40:25
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.

:0fhw
* ^Subject:.\*\*\*\*\*SPAM\*\*\*\*\*
| /usr/bin/perl -n -p -e "s/Subject: .....SPAM..... */Subject: /"

or use your favorite program to eliminate the spam header, with the fixed
Subject: *****SPAM***** format, even this should work:

:0fhw
* ^Subject:.\*\*\*\*\*SPAM\*\*\*\*\*
| /usr/bin/cut -d " " -f 1,3-

--
Klaus Johannes Rusch
KlausRusch(_at_)atmedia(_dot_)net
http://www.atmedia.net/KlausRusch/



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