procmail
[Top] [All Lists]

Re: \< and \> don't quite make it

2006-09-13 06:03:27
On Wed, Sep 13, 2006 at 11:38:15AM +0200, Ruud H.G. van Tol wrote:

  IF    = 9876543210^0
  OR_IF = $IF
  AND   = 0^0

  SUBJ = 'abc def'

  :0
  *$ $IF    SUBJ ?? h
  *$ $OR_IF SUBJ ?? g
  *$ $OR_IF SUBJ ?? f
  *$ $AND
  * ^From:.*john
  { TESTING }

Okay, that's certainly a good approach.

Of course, one could have used comments also.

    :0
    *$ $IF    SUBJ ?? h
    *$ $OR_IF SUBJ ?? g
    *$ $OR_IF SUBJ ?? f
    # AND
    * ^From:.*john
    { TESTING }

But I don't claim that's better, just different.
(As you know but I'll state for general consumption,
interrupting conditions with interspersed comments works
only in newer versions of procmail [fsvo "newer"].)

    > echo "From: John" | procmail -m DEFAULT=/dev/null VERBOSE=y 'SUBJ=abc 
def' comment.rc  
   procmail: [13086] Wed Sep 13 14:51:22 2006
   procmail: Assigning "SUBJ=abc def"
   procmail: Assigning "MAILDIR=."
   procmail: Rcfile: "comment.rc"
   procmail: Assigning "IF=9876543210^0"
   procmail: Assigning "OR_IF=9876543210^0"
   procmail: Score:       0       0 "h"
   procmail: Score:       0       0 "g"
   procmail: Score: 2147483647 2147483647 "f"
   procmail: Match on "^From:.*john"
   procmail: Assigning "TESTING"
   procmail: Assigning "LASTFOLDER=/dev/null"
   procmail: Opening "/dev/null"
     Folder: /dev/null

-- 
dman

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail