procmail
[Top] [All Lists]

Re: Syntax of scoring command negation

1997-02-06 10:30:02
But that's not what Lars Kellogg-Stedman suggested (assuming that it
works, which I do):

Which is often, but not always, a valid assumption.  My example had one 
small typo in it; it should read:

* 1^1 ! ? /bin/countat

Notice the '?', which I forgot, which is how how procmail knows that this 
is a program and not a regular expression (which, in turn, answers most 
of your questions about ambiguity).  Incidentally, this is documented; see 
the procmailrc man page:

     !    Invert the condition.
 
     $    Evaluate the remainder according to sh(1)  substitution
          rules  inside  double  quotes, skip leading whitespace,
          then reparse it.
 
     ?    Use the exitcode of the specified program.

Sorry for contributing to the general confusion here :-).

Lars Kellogg-Stedman's example pretty much fits that criteria... I
wonder, where did he learn it? Did I miss something? Perhaps it's
in the smartlist code or something?

No, it's not in the smartlist code, it's all in the man pages.  There are 
two reasonably useful examples in the procmailsc man page, if you're 
looking for information about weighted scoring, and the procmailrc man 
page has all the information about conditions in general.

In fact, the only "new" syntax introduced in the procmailsc man pages is 
the w^x at the beginning of a condition to give it a weight.  Everything 
following the weighting is a standard procmail condition.

-- Lars

---
Lars Kellogg-Stedman * lars(_at_)bu(_dot_)edu * (617)353-8277
Office of Information Technology, Boston University

<Prev in Thread] Current Thread [Next in Thread>