On Tue, Aug 12, 2003 at 05:08:19PM +0300, ODHIAMBO Washington wrote:
* Scott Wiersdorf <scott(_at_)perlcode(_dot_)org> [20030812 17:03]: wrote:
On Tue, Aug 12, 2003 at 12:29:29PM +0300, ODHIAMBO Washington wrote:
Ehlo everyone ;)
I hope that it's very possible to drop (into the bottomless pit) mail
that have been tagged as spam with a certail score.
You'll want to search the procmail archives (this question comes up
every now and then). The following works for positive scores:
Hi Scott,
Thanks alot for the help. I will surely test it. I could have searched
the archives. I have the posts (15MB) in one of my mailboxes, but it
got a bit tricky to do the search.
How about reading different values for MAXSPAM for different users. Is
that an easy possibility?
I suppose something like this might work:
DEFAULT_SPAM=5.00
DROPPRIVS=yes
MAXSPAM=`head -n 1 $HOME/.maxspam`
:0
* ! $MAXSPAM ?? ^^[0-9\.]+^^
{ MAXSPAM = $DEFAULT_SPAM }
where .maxspam is a file containing the score at the first line of the
file. If you want the scores from a single file:
DEFAULT_SPAM=5.00
DROPPRIVS=yes
USER=`id -un`
MAXSPAM=|egrep '^${USER} ' /etc/maxspam
:0
* $MAXSPAM ?? ^.*\/[0-9\.]+
{ MAXSPAM=$MATCH }
:OE
{ MAXSPAM=$DEFAULT_SPAM }
Hopefully someone here can clean this up a little; I'm sure this isn't
optimized.
I'm going to cc the list on this again; future replies should stay on
the list.
Scott
--
Scott Wiersdorf
<scott(_at_)perlcode(_dot_)org>
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail