At 09:53 2003-11-20 -0500, Dave Stern - Former Rocket Scientist wrote:
I have a user who wants procmail to
run spamassassin ( and drop in spambox if appropriate)
run vacation on all those that pass thru
copy all messages that hit vacation to a backup mbox
filter some messages based on subject or from
let everything else that doesn't hit these test remain in inbox.
I'm able to do most of the above except some things that should be filtered
also remain in the inbox. Is the above possible?
Yes, though I'm unclear - what messages (besides spam) wouldn't be subject
to vacation, and therefore even be around AFTER vacation to be filtered
based on subject? Perhaps you specified your order or criteria wrong?
Here's what I have
:0fw: $HOME/spamassassin.lock
* < 256000
| /sausr/bin/spamc
:0:
* ^X-Spam-Status: Yes
$MAILDIR/Likelyspam
I don't use SA, but I believe if that second recipe has an 'a' flag, you'd
marginally optimize things. For one, if the message is larger than your
threshold, any X-Spam-Status header you find wasn't put there by you. Next
(and since I don't use SA, I don't know), since the SA recipe uses the 'w'
flag, presumably it returns an exit code based on whether it doctored-up
the message -- and if it DIDN'T, then there's no readon to check the
X-Spam-Status.
:0c
|/usr/local/bin/vacation jsmith
You invoke vacation on a copy.
:0ca :
$MAILDIR/backup
And back up those for which vacation didn't exit with an error for. The
manpage for the version of vacation which I have on one of my systems
doesn't document return values of any sort though, so I don't know what
conditions the vacation won't always return succcess for.
:0ca :
* ^Subject:.*testme
$MAILDIR/testme
This here depends upon the output of the vacation recipe.
Note that inclusion of $MAILDIR in the delivery spec is a bit redundant -
see 'man procmailrc', which has definitions for the variables under the
heading "Environment".
---
Sean B. Straw / Professional Software Engineering
Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
Please DO NOT carbon me on list replies. I'll get my copy from the list.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail