You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Anne Ramey <an...@blast.com> on 2004/06/14 17:28:09 UTC

per-user local sa rules

I'm missing something.  I want to set up a per user spamassassin 
set-up...instead of using amavis to call spamassassin...so that users 
can set their own spam rules.  I get how to set up procmail to run 
spamassassin.  What I'm not understanding is how this allows per-user 
rules.  Do I put the .cf files in that user's home directory?  Will it 
still use all the rules in /etc/mail/spamassassin?

Thanks,
Anne


Re: files in /etc/mail/spamassassin (was: per-user local sa rules)

Posted by Matt Kettler <mk...@evi-inc.com>.
At 05:44 AM 6/15/2004, Martin Schröder wrote:
>So SA 2.63 reads all the files in /etc/mail/spamassassin, not
>only local.cf? According to
>http://mywebpages.comcast.net/mkettler/sa/SA-rules-howto.txt
>rules should be added to local.cf

I suggested rules to be added to local.cf for simplicity of the guide. Most 
people writing their own rules only have a small handful (1-15), in which 
case a separate .cf file is not really needed. There's lots of small 
details which aren't important to most people that are glossed over in that 
guide to prevent it from becoming 200+ pages in length.

However, it IS true that SA will read all .cf files in 
/etc/mail/spamassassin, and when downloading whole cf files full of rules, 
I'd suggest just copying the file over and not bothering to append to local.cf.

(You also need to keep in mind that guide was originally written before 
SARE started, so at the time there weren't copious amounts of custom rules 
floating about.)


files in /etc/mail/spamassassin (was: per-user local sa rules)

Posted by Martin Schröder <ms...@artcom-gmbh.de>.
On 2004-06-14 11:11:02 -0500, Bob McClure Jr wrote:
> On Mon, Jun 14, 2004 at 11:28:09AM -0400, Anne Ramey wrote:
> > Do I put the .cf files in that user's home directory?
> 
> If they are to apply to everyone, leave them in
> /etc/mail/spamassassin.  They'll be picked up there.  If they are
> user-specific, I think the rules need to be in user_prefs.

So SA 2.63 reads all the files in /etc/mail/spamassassin, not
only local.cf? According to 
http://mywebpages.comcast.net/mkettler/sa/SA-rules-howto.txt
rules should be added to local.cf

Best regards
        Martin
-- 
               Martin Schröder, ms@artcom-gmbh.de
     ArtCom GmbH, Lise-Meitner-Str 5, 28359 Bremen, Germany
          Voice +49 421 20419-44 / Fax +49 421 20419-10
                    http://www.artcom-gmbh.de

Re: per-user local sa rules

Posted by Bob McClure Jr <ro...@earthlink.net>.
On Mon, Jun 14, 2004 at 04:40:16PM -0400, Anne Ramey wrote:
> Thanks, That's what I needed.  One more thing.  Is there any way for a 
> user to submit a mail as a false positive or false negative directly to 
> spamassassin for their per-user rule set?

Yes, but the method depends on where the mail is at the time the user
decides it's a FP or FN.  If it's still on the server, say on their
own account, they can save it to their own "spam" or "ham" buckets,
and have a nightly cron job run "sa-learn --spam --mbox
<spam_bucket>", and then clean out the bucket.

One of my clients is all MS Outhouse^H^H^H^H^Hlook users, so they save
their [h|sp]am to local boxes, and then occasionally transfer those
files (they are .pst files).  Then a cron job runs "readpst" to turn
the files into mbox files, after which the above sa-learn solution is
applied.

Perhaps the best solution is to have users get their mail using IMAP
instead of POP3, so that they can put the mail back on to the server
into [h|sp]am buckets, and then process with sa-learn, as above.

Note that sa-learn must be run as that user so that his Bayes DB will
be updated.  Also, FPs are best handled by making whitelist entries in
user_prefs, because otherwise it may take several sa-learn --ham
sessions before such mail drops below the spam threshold.

> Anne
> On Jun 14, 2004, at 12:11 PM, Bob McClure Jr wrote:
> 
> >On Mon, Jun 14, 2004 at 11:28:09AM -0400, Anne Ramey wrote:
> >>I'm missing something.  I want to set up a per user spamassassin
> >>set-up...instead of using amavis to call spamassassin...so that users
> >>can set their own spam rules.  I get how to set up procmail to run
> >>spamassassin.  What I'm not understanding is how this allows per-user
> >>rules.
> >
> >User-specific rules normally go into ~/.spamassassin/user_prefs.
> >"man Mail::SpamAssassin::Conf" for more information.
> >
> >>Do I put the .cf files in that user's home directory?
> >
> >If they are to apply to everyone, leave them in
> >/etc/mail/spamassassin.  They'll be picked up there.  If they are
> >user-specific, I think the rules need to be in user_prefs.
> >
> >>Will it
> >>still use all the rules in /etc/mail/spamassassin?
> >
> >Yes.
> >
> >>Thanks,
> >>Anne
> >
> >SA will build the user-specific Bayes db in each user's
> >~/.spamassassin/.
> >
> >Cheers,

Cheers,
-- 
Bob McClure, Jr.             Bobcat Open Systems, Inc.
robertmcclure@earthlink.net  http://www.bobcatos.com
God is everywhere so pray anywhere.

Re: per-user local sa rules

Posted by Anne Ramey <an...@blast.com>.
Thanks, That's what I needed.  One more thing.  Is there any way for a 
user to submit a mail as a false positive or false negative directly to 
spamassassin for their per-user rule set?

Anne
On Jun 14, 2004, at 12:11 PM, Bob McClure Jr wrote:

> On Mon, Jun 14, 2004 at 11:28:09AM -0400, Anne Ramey wrote:
>> I'm missing something.  I want to set up a per user spamassassin
>> set-up...instead of using amavis to call spamassassin...so that users
>> can set their own spam rules.  I get how to set up procmail to run
>> spamassassin.  What I'm not understanding is how this allows per-user
>> rules.
>
> User-specific rules normally go into ~/.spamassassin/user_prefs.
> "man Mail::SpamAssassin::Conf" for more information.
>
>> Do I put the .cf files in that user's home directory?
>
> If they are to apply to everyone, leave them in
> /etc/mail/spamassassin.  They'll be picked up there.  If they are
> user-specific, I think the rules need to be in user_prefs.
>
>> Will it
>> still use all the rules in /etc/mail/spamassassin?
>
> Yes.
>
>> Thanks,
>> Anne
>
> SA will build the user-specific Bayes db in each user's
> ~/.spamassassin/.
>
> Cheers,


Re: per-user local sa rules

Posted by Bob McClure Jr <ro...@earthlink.net>.
On Mon, Jun 14, 2004 at 11:28:09AM -0400, Anne Ramey wrote:
> I'm missing something.  I want to set up a per user spamassassin 
> set-up...instead of using amavis to call spamassassin...so that users 
> can set their own spam rules.  I get how to set up procmail to run 
> spamassassin.  What I'm not understanding is how this allows per-user 
> rules.

User-specific rules normally go into ~/.spamassassin/user_prefs.
"man Mail::SpamAssassin::Conf" for more information.

> Do I put the .cf files in that user's home directory?

If they are to apply to everyone, leave them in
/etc/mail/spamassassin.  They'll be picked up there.  If they are
user-specific, I think the rules need to be in user_prefs.

> Will it 
> still use all the rules in /etc/mail/spamassassin?

Yes.

> Thanks,
> Anne

SA will build the user-specific Bayes db in each user's
~/.spamassassin/.

Cheers,
-- 
Bob McClure, Jr.             Bobcat Open Systems, Inc.
robertmcclure@earthlink.net  http://www.bobcatos.com
God is everywhere so pray anywhere.