per_user prefs not working ?
Michael Baird
mike at TC3NET.COM
Tue Dec 9 13:42:24 GMT 2003
Ok, I looked in the rulesets, still not sure, how to go about it, can
you give me an example, of what needs to be set in MailScanner and a
default ruleset (I read on the list it doesn't work, so I stopped
trying). I imagine the ruleset would look like
To: test at domain.com /home/users/test/.spamassassin/user_prefs
FromOrTo: default /etc/MailScanner/user_prefs
In MailScanner.conf I would point SpamAssassin Prefs File to this
ruleset? What about Spamassassin User State Dir, I have that set to
nothing, should the ruleset go here? Should this look up each
individual's ~/.spamassassin/user_prefs by default? If there is an easy
way to do this I'd prefer it.
Regards
MIKE
> 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