per_user prefs not working ?

Julian Field mailscanner at ecs.soton.ac.uk
Tue Dec 9 08:55:43 GMT 2003


You can do all the user_prefs mentioned below in MailScanner rulesets. No
need for procmail hacks.
See /etc/MailScanner/rules/*

At 15:15 08/12/2003, you wrote:
>MailScanner won't use per user spamassassin preferences, it uses the
>prefs file specified in MailScanner.conf for all users or
>/root/.spamassassin, since MailScanner runs as root. I faced this issue
>myself when I migrated my spam scanning to MailScanner, my solution was
>to create a procmail ruleset, which duplicates all my users individual
>spamassassin user_prefs behaviors (hit threshold, spam tag, whitelist,
>blacklist). I just have MailScanner check the spamlevel and such. I'll
>post the recipe here (I'm still working on making the
>whitelist/blacklist work better). Scanning all messages through
>MailScanner and filtering via a procmail ruleset, has lowered my load
>averages tremendously, as opposed to calling spamc via a procmail
>ruleset.
>
>
>INCLUDERC=$HOME/.procmail/.spamprefs
>WHITELIST=$HOME/.procmail/.whitelist
>BLACKLIST=$HOME/.procmail/.blacklist
>
>:0
>* < 20000
>{
>         :0
>         * ?egrep --silent --file $WHITELIST
>         $DEFAULT
>         :0
>         * ?egrep --silent --file $BLACKLIST
>         /dev/null
>         :0
>         *$ ^X-TC3Net-Level: $SPAMLEVEL
>         {
>                 :0
>                 * ^Subject:[    ]*\/[^  ].*
>                 {
>                         SUBJECT=$MATCH
>                 }
>                 :0 fw
>                 | formail -I "Subject: $SPAMTAG $SUBJECT"
>                 :0
>                 $SPAMBOX
>         }
>}
>
>Where .whitelist and .blacklist are just list of email addresses, and
>.spamprefs contains a few variable definitions used in the recipe.
>
>SPAMLEVEL=xxxxxxxxxx
>SPAMTAG=*****SPAM*****
>SPAMBOX=.maildir/
>
>Regards
>MIKE
>
> > Hi
> >
> > I am trying to get the per_user preferences working
> >
> > I set SpamAssassin User State Dir = ~/.spamassassin/
> > in /etc/MailScanner.conf
> >
> > I then created a  .spamassassin directory in my home dir
> >
> > I then create a file user_prefs in this directory
> >
> > inside the user_prefs file i put  required_hits  10
> >
> > i then chown and chmod accordingly
> >
> > Restart MailScanner and send a test spam.
> >
> > The headers still tell me it is working on a required hits of 5
> >
> > What am i doing wrong?
> >
> > Regards
> >
> > Stuart Clark RHCE
> > Spacelink Communications Pty Ltd
> >

--
Julian Field
www.MailScanner.info
MailScanner thanks transtec Computers for their support

PGP footprint: EE81 D763 3DB0 0BFD E1DC  7222 11F6 5947 1415 B654



More information about the MailScanner mailing list