procmail
[Top] [All Lists]

Re: Request for syntax assistance

2003-12-13 22:08:43
I think I spoke too soon. I thought about what you said and wrote the
rest of this. How does it look


#Check with Anomy always
:0f
| $ANOMY/bin/sanitizer.pl
                                                                                
# Check against personal whitelists
FROM=`formail -XFrom: | formail -r -xTo: | tr -d ' '`
:0
* ? grep -F -i -x -q "$FROM" $HOME/.whitelist
SWITCHRC=$HOME/.procmailrc
                                                                                
# Check against personal maillist-subscriptions
SUBJECT=`formail -XSubject:' '`
:0
* ? grep -F -i -x -q "$SUBJECT" $HOME/.maillist
SWITCHRC=$HOME/.procmailrc
                                                                                
# Run Spamassassin
:0f
* ! ^X-OED:*
* < 256000
        | /usr/bin/spamassassin
        :0e
        {
                EXITCODE=$?
        }
                                                                                
# Send all mail marked as SPAM to personal SPAM folder
:0:
* ^X-Spam-Status: Yes
$HOME/Mail/SPAM
                                                                                
# Send remainder to personal UNKNOWN folder
:0:
*
$HOME/Mail/UNKNOWN


SWITCHRC = /dev/null

should terminate /etc/procmailrc.  You could wrap that up in a test 
condition looking for a user .procmailrc, but if you want to terminate the 
/etc/procmailrc, you probably want to terminate whether you have a user 
.procmailrc or not...

---
  Sean B. Straw / Professional Software Engineering

-- 
Nick (Nix) Gray
Senior Systems Engineer
Bruzenak Inc.
(512) 331-7998

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