On Thu, Jul 25, 2002 at 08:25:08PM -0700, William Pietri wrote:
I'm now at the point where I'd like to add Spamassassin into the mix. It
works fine in my own .mailfilter recipies, happily noticing spam and
putting it in a Maildir folder like this:
if (/^X-Spam-Flag: *YES/)
to .Spam
The next stage is presumably to put it in /etc/mailfilterrc, making it work
for everybody. But what if they don't want to use it? I'd like for them to
be able to put something in their .mailfilter to override my magic, but I
don't quite see how to do elegantly.
Any suggestions?
You can't. /etc/maildroprc is read before .mailfilter.
Well, appending the following to /etc/maildroprc might work:
SPAMFILTER=1
exception {
include "$HOME/.mailfilter"
}
if ($SPAMFILTER == 1)
{
if (/^X-Spam-Flag: *YES/)
to .Spam
}
to $DEFAULT
This should duplicate the default processing of $HOME/.mailfilter manually,
and if $HOME/.mailfilter does not deliver the mail it will go to $DEFAULT,
after checking for X-Spam-Flag, which can now be bypassed by resetting
SPAMFILTER=0 in .mailfilter.