[100408] in RedHat Linux List

home help back first fref pref prev next nref lref last post

Re: procmail statement

daemon@ATHENA.MIT.EDU (John D. Hardin)
Fri Nov 20 11:58:43 1998

Date: Fri, 20 Nov 1998 08:55:51 -0800 (PST)
From: "John D. Hardin" <jhardin@wolfenet.com>
To: Red Hat Users List <redhat-list@redhat.com>
In-Reply-To: <19981120113047.A12904@adbvdesign.analog.com>
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

On Fri, 20 Nov 1998, Thomas Ribbrock (Design/DEG) wrote:

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

Procmail REs are not case-sensitive, and that will match phrases as well.

Try this:

* ^Subject:  *test
-----------^^ two spaces

Which means:
Match "Subject: " at the beginning of the line,
followed by zero or more extra spaces
followed by "test"

NB: It's a damn shame that Procmail's RE parser doesn't understand \s
or + at this time.

--
 John Hardin KA7OHZ                               jhardin@wolfenet.com
 pgpk -a finger://gonzo.wolfenet.com/jhardin    PGP key ID: 0x41EA94F5
 PGP key fingerprint: A3 0C 5B C2 EF 0D 2C E5  E9 BF C8 33 A7 A9 CE 76 
-----------------------------------------------------------------------
   5 days until Sleeping In Light


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


home help back first fref pref prev next nref lref last post