procmail
[Top] [All Lists]

Re: boolean usage

1996-03-08 13:51:07
twfic(_at_)netcom(_dot_)netcom(_dot_)com (Ty Fairchild) writes:
...
My question is: Realizing that procmail condition lines are normally
and'ed and *not* or'ed, is it possible that a Boolean operator such as
*NOT* might be used to establish a condition in an rc.script?

For example, something like:

:2

* ^From:.*twfic
* ^Subject:.*NOT*(scripts)    
{
      ETC.

}


Since you're not sure if you can express the desired condition in
procmail, perhaps you should state in English exactly what you want the
condition to work out to.  Say, something like:

        It should match any message whose From: line contains 'twfic'
        and whose Subject: line does _not_ contain 'scripts'.

Assuming that's the reading you want, then:

:0
*   ^From:.*twfic
* ! ^Subject:.*scripts
{
...
}


If you can state what you want in unambiguous English (or German, or
whatever), then there's an excellent chance that you can translate that
statement into a series of procmail recipes.  I find the hard part is
usually figuring out what I really want to check for.


Philip Guenther

----------------------------------------------------------------
Philip Guenther                 UNIX Systems and Network Administrator
Internet: guenther(_at_)gac(_dot_)edu   Phonenet: (507) 933-7596
Gustavus Adolphus College       St. Peter, MN 56082-1498

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