procmail
[Top] [All Lists]

Re: Consider LOGFILE and Subject in same recipe

2004-03-18 13:00:21
Christopher Benson wrote:


I have recipe that I'd like to shorten up some if possible.  I'm wondering
if there is like an OR operator or something.  So here goes.


:0
* !^Subject:.*(bunch of subject items)
{
  Do stuff..
}

:0
* !LOGFILE ?? account1
{
  Do stuff..
}

OK, so you want to do the stuff unless the subject matches the regexp and the logfile's name includes the string "account1", right? The way you have it, if neither of those is true, you do the stuff twice!

A couple of ways:

 :0
 * LOGFILE ?? account1
 * ^Subject:.*(bunch of subject items)
 { } # this is the procmail no-op
 :0E
 { Do stuff.. }

or

 :0
 * 9876543210^0 LOGFILE ?? account1
 * 1^0 ^Subject:.*(bunch of subject items)
 { Do stuff.. }

If you don't understand the second one, the procmailsc(5) man page will explain it.


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