procmail
[Top] [All Lists]

Re: spamchecking and multiple bypass lists

1997-07-05 05:36:00
At 11:44 AM 7/4/97 -0400, Timothy Luoma wrote:

I've got 4 lists which I use to sort mail, and I want to use them to bypass  
my spam checking RC, and this works:

:0
* ! ? $FGREP -i ${REPLYTO}  ${PROCDIR}/spambypass.txt
* ! ? $FGREP -i ${REPLYTO}  ${PROCDIR}/known-users/NeXT-Users.txt
* ! ? $FGREP -i ${REPLYTO}  ${PROCDIR}/known-users/zsh-users.txt
* ! ? $FGREP -i ${REPLYTO}  ${PROCDIR}/known-users/peak-users.txt
{ INCLUDERC=$PROCDIR/rcfiles/spam-check.rc }

However, I want to have an 'else' for the above, ie if they are in any of  
those lists, then do this:

:0E
| $FORMAIL -I"X-SpamChecker: PASSED" -I"X-SpamNote: ByPassed"


But the 'else' part isn't being processed, so my guess is I'm doing  
something fundamentally wrong here....

I'm pretty sure that the INCLUDERC "breaks" the if-else.  (It probably
acts like an else to the last thing in the INCLUDERC if I read the
man page correctly.)

If the INCLUDERC is always delivering recipes, just omit the E.
Otherwise, you could try something like (off the top of my head,
and untested):

FLAG="no"
:0
* ! ? $FGREP ...
* ...
{ FLAG="yes"
  :0
  { INCLUDERC=... }
}

:0
* FLAG ?? ^^no^^
| $FORMAIL ...


Cheers,
Stan

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