[100363] in RedHat Linux List
Re: procmail statement
daemon@ATHENA.MIT.EDU (Thomas Ribbrock \(Design/DEG\))
Fri Nov 20 06:29:41 1998
Date: Fri, 20 Nov 1998 11:30:47 +0000
From: "Thomas Ribbrock \(Design/DEG\)" <argathin@iname.com>
To: Red Hat Users List <redhat-list@redhat.com>
Mail-Followup-To: Red Hat Users List <redhat-list@redhat.com>
In-Reply-To: <Pine.LNX.4.05.9811200947480.4046-100000@winbuster.magic.fr>; from Zoki on Fri, Nov 20, 1998 at 09:54:29AM +0100
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com
Zoki writes:
> I would like to filter all mails with the word "test" in the subject line.
> T.i. only those messages that contain the isolated word "test" and not
> phrases with the combination of test in them.
>
> I thought to do this:
> :0
> * ^(From|Cc|To|X-Loop).* --> should mean anybody!?
> * ^Subject:(.*test|Test|TEST)
> /dev/null
If you want to filter out those mails from anybody, you don't need the first
line of the receipe (the one with the From). If there's only the "Subject:"
line in the receipe then that's all procmail will check for.
As for the second line: Your current version will also match
Subject: This is a test. (for example). Is this what you want?
An alternative way for writing that line would be:
* ^Subject:.*[tT][eE][sS][tT]
That'll definitely match all possible combinations of upper and lower case.
HTH,
Thomas
--
"Look, Ma, no obsolete quotes and plain text only!"
Thomas Ribbrock | http://www.bigfoot.com/~kaytan | ICQ#: 15839919
"You have to live on the edge of reality - to make your dreams come true!"
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com http://archive.redhat.com
To unsubscribe: mail redhat-list-request@redhat.com with
"unsubscribe" as the Subject.