procmail
[Top] [All Lists]

Re: Recipe matching

2001-12-17 11:06:24
Udi Mottelo <uuddii(_at_)eng(_dot_)tau(_dot_)ac(_dot_)il> says...

On Mon, 17 Dec 2001, Dallman Ross wrote:

[...]
Aside from the above baffling cirmumstance, let's go on to a further
isssue.  Remember (or ascertain from the man pages) that procmail's egrep
parser is minimalistic/non-greedy.  That means that it will stop
on the first match.  Supposing we had as our example string

    abc.ch.com

Your recipes would match, because there is a dot followed by "ch".
You want to tell procmail that there is a word boundary following
the "ch".  It could be a space, tab, `>', or newline.  A suggested way
to handle this would be, as your condition line:

    * ^Received:.+\.ch\>

The `\>' token is a word-boundary signifier to procmail.


      Unfortunately, "\>" takes more characters including ".", it would
      not help in this case.  Try this: "[    >$]"

Ok.  So if I want to match ONLY the end of a string, like  .ch  in
abc.def.ch  in the "Received" header, how would I write it?

:0
* ^Received:[.ch>$]      ?

                                Jack

-- 
aka Keet        Visit my web page at http://junior.apk.net/~jac/
    * If you post a followup, -DO NOT- email me a copy of it! *
    Fun photo contest: http://home.dal.net/jam/kimva_photo.html
"We were trying to compete with The Beach Boys and Pet Sounds" - Guess!

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