As ever, there is a bug in the usage of the "listcheck.rc"
recipe file I suggested in a previous mail (included below).
The problem is in how AVOID is defined. In the line marked "b->",
you'll notice that the AVOID definition includes a "not" operator:
"!". But, the recipe already includes the "!" (in the line marked
"a->") when substituting AVOID into the condition line, causing a
double negation, which is the opposite of what we need.
Since the intuitive meaning of AVOID is a regexp which matches things
we want to avoid ("avoid these things"), then it should not include the
'!'.
> 3a. Using an internal procmail "table" of addresses and lists:
>
> First we need a "subroutine" recipe file:
>
>
> # listcheck.rc
> #
> # This is a procmail subroutine recipe file
> # Include it with LIST and DEST set to the listname
> # to check for, and the folder name to file to.
> #
> # If AVOID is set, then use it to AVOID certain
> # mails.
> #
> # In addition, if COPY is set, I want to keep
> # processing the mail, marking it filed with a
> # new header (X-Filed:), and letting it end up in my
> # default mailbox.
>
> :0 ${COPY:+c}:
> * $^TO_$LIST\>
a-> > * $${AVOID:+!$AVOID}
> * $ DEST ?? .
> $DEST
>
> :0 afh # we copy-filed the mail; mark it with the destination
> | formail -A"X-Filed: $LASTFOLDER"
>
>
> Then, we need to check on these lists, in our ~/.procmailrc:
>
> # Avoid list mail with any of the these conditions
b-> >
AVOID='!(^TOmito@|^From:.*(linus|torvalds)|^References:(_dot_)*mito(_at_)retriever)'
should be written instead as:
AVOID='(^TOmito@|^From:.*(linus|torvalds)|^References:(_dot_)*mito(_at_)retriever)'
> COPY # I don't copy these; I read them at my leisure
> LIST=kernel DEST=info/kernel INCLUDERC=listcheck.rc
> LIST=x11 DEST=info/x11 INCLUDERC=listcheck.rc
> LIST=mutt DEST=info/mutt INCLUDERC=listcheck.rc
> LIST=zsh DEST=sw/zsh INCLUDERC=listcheck.rc
> LIST=laptop DEST=hw/laptop INCLUDERC=listcheck.rc
>
> COPY=yes # I'm active on these, so copy-file them
> LIST=procmail DEST=sw/procmail INCLUDERC=listcheck.rc
> LIST=jdbc DEST=info/jdbc INCLUDERC=listcheck.rc
> LIST=vimdev DEST=info/vimdev INCLUDERC=listcheck.rc
___________________________________________________________
Alan Stebbens <aks(_at_)sgi(_dot_)com> http://reality.sgi.com/aks