procmail
[Top] [All Lists]

Re: procmail 'if' statements

2003-12-31 14:46:26
dman wrote:

Did you really want $SQLRESULT to be either less than 8 or
greater than 16?  

Yes, it was an adaptation of a recipe for testing whether a message was
sent outside local business hours (before 8:00 am or after 4:00 pm).
I've been using this as a "spammishness" criterion, since most of the
non-greenlisted mail received outside these hours is spam. (legitimate
new business contacts usually send email during normal hours)

  LOWER_BOUND =  8
  UPPER_BOUND = 16
  TINY        =  0.000001

  :0
  * $    $SQLRESULT^0
  * $         $TINY^0
  * $ -$LOWER_BOUND^0
  {
     # We're above the lower bound

     :0
     * $ $UPPER_BOUND^0
     * $        $TINY^0
     * $  -$SQLRESULT^0
     | do_something

  }

Excellent, I will take the union of this recipe with David T.'s and post
a procmail-only "business hours" recipe if anyone is curious.

-JM

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