Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Share sa-learn trainign with all users
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
fvant
Guru
Guru


Joined: 08 Jun 2003
Posts: 328
Location: Leiden, The Netherlands

PostPosted: Sun Nov 05, 2006 11:43 am    Post subject: Share sa-learn trainign with all users Reply with quote

I always thought that if i run sa-learn as root and use folders from several users as training input, all users got to benefit from the learning SA is doing. After reading some posts and sites i am not so sure anymore.

if i have multiple users in a domain, how should i config SA and properly sa-learn SA so that all users use the same ruleset/trained behaviour ?
Back to top
View user's profile Send private message
KRF
Tux's lil' helper
Tux's lil' helper


Joined: 17 Jun 2006
Posts: 124
Location: Germany

PostPosted: Tue Nov 07, 2006 6:41 pm    Post subject: Reply with quote

As root, run:
Code:
sa-learn --spam --dir ~user1/somemaildir
sa-learn --spam --dir ~user2/somemaildir


Then symlink the /root/.spamassassin to ~user1/.spamassassin and ~user2/.spamassassin

They should have the same trained SA now (I think :wink:).
Tell me if I'm wrong.
_________________

Gentoo Linux, running kde-3.5
CPU: i686 Intel P4 2.80GHz | RAM: 2048MB DDR
Profile: gentoo-sources-2.6.23*, gcc-4.1*, portage-2.1.3* (2007.0)

Please add [SOLVED] to your message title if your problem is solved.
Back to top
View user's profile Send private message
fvant
Guru
Guru


Joined: 08 Jun 2003
Posts: 328
Location: Leiden, The Netherlands

PostPosted: Tue Nov 07, 2006 8:17 pm    Post subject: Reply with quote

The answer is in this setting in /etc/spamassassin/local.cf


bayes_path /path/filename (default: ~/.spamassassin/bayes)
This is the directory and filename for Bayes databases. Several databases will be created, with this as the base directory and filename, with
"_toks", "_seen", etc. appended to the base. The default setting results in files called "~/.spamassassin/bayes_seen", "~/.spamassas-
sin/bayes_toks", etc.

By default, each user has their own in their "~/.spamassassin" directory with mode 0700/0600. For system-wide SpamAssassin use, you may want
to reduce disk space usage by sharing this across all users. However, Bayes appears to be more effective with individual user databases.
Back to top
View user's profile Send private message
trossachs
Veteran
Veteran


Joined: 22 Jan 2004
Posts: 1204
Location: London

PostPosted: Tue Nov 14, 2006 3:20 pm    Post subject: Reply with quote

Hasn't the:

Code:
sa-learn --dir


... switch been depreciated in the 3.1.x series of Spamassassin? Since I have upgraded from 3.0.4 to 3.1.6, SA no longer recognises the --dir command. Do I get around this by going into the directory I want sa-learn to scan and then printing:

Code:
sa-learn --spam


from within that said directory?
Back to top
View user's profile Send private message
KRF
Tux's lil' helper
Tux's lil' helper


Joined: 17 Jun 2006
Posts: 124
Location: Germany

PostPosted: Tue Nov 14, 2006 4:15 pm    Post subject: Reply with quote

You're right. I just noticed that --dir is deprecated (my whole sa-crons did not work all the time :oops:). So i had to replace --dir with --mbox.
For more info use man sa-learn. It's quite helpful.
_________________

Gentoo Linux, running kde-3.5
CPU: i686 Intel P4 2.80GHz | RAM: 2048MB DDR
Profile: gentoo-sources-2.6.23*, gcc-4.1*, portage-2.1.3* (2007.0)

Please add [SOLVED] to your message title if your problem is solved.
Back to top
View user's profile Send private message
trossachs
Veteran
Veteran


Joined: 22 Jan 2004
Posts: 1204
Location: London

PostPosted: Tue Nov 14, 2006 4:20 pm    Post subject: Reply with quote

I only noticed because since I have switched the 3.1.x series, I have started to get spam through everyday. I checked my cron jobs and they were all running so I tried a manual run on sa-learn and noticed the --dir change.

Can I use this --mbox switch with maildirs? :?
Back to top
View user's profile Send private message
KRF
Tux's lil' helper
Tux's lil' helper


Joined: 17 Jun 2006
Posts: 124
Location: Germany

PostPosted: Tue Nov 14, 2006 4:26 pm    Post subject: Reply with quote

Depends on your email-client I think. With kmail e.g. you can easily use
Code:
sa-learn --spam .kde/share/apps/kmail/mail/inbox/cur

Ask google. 8)
_________________

Gentoo Linux, running kde-3.5
CPU: i686 Intel P4 2.80GHz | RAM: 2048MB DDR
Profile: gentoo-sources-2.6.23*, gcc-4.1*, portage-2.1.3* (2007.0)

Please add [SOLVED] to your message title if your problem is solved.
Back to top
View user's profile Send private message
trossachs
Veteran
Veteran


Joined: 22 Jan 2004
Posts: 1204
Location: London

PostPosted: Tue Nov 14, 2006 4:29 pm    Post subject: Reply with quote

Sorted! I'd forgotten about the full maildir path to .../cur :wink:
Back to top
View user's profile Send private message
fvant
Guru
Guru


Joined: 08 Jun 2003
Posts: 328
Location: Leiden, The Netherlands

PostPosted: Tue Nov 14, 2006 6:40 pm    Post subject: Reply with quote

KRF wrote:
Depends on your email-client I think. With kmail e.g. you can easily use
Code:
sa-learn --spam .kde/share/apps/kmail/mail/inbox/cur

Ask google. 8)


sa-learn has nothing to do with your mailclient but the example you give is correct.
Back to top
View user's profile Send private message
KRF
Tux's lil' helper
Tux's lil' helper


Joined: 17 Jun 2006
Posts: 124
Location: Germany

PostPosted: Tue Nov 14, 2006 7:00 pm    Post subject: Reply with quote

But it depends on how the email-client saves the emails. And the question was whether he needs the --mbox switch or not. And in case of kmail he doesn't.
_________________

Gentoo Linux, running kde-3.5
CPU: i686 Intel P4 2.80GHz | RAM: 2048MB DDR
Profile: gentoo-sources-2.6.23*, gcc-4.1*, portage-2.1.3* (2007.0)

Please add [SOLVED] to your message title if your problem is solved.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum