John wrote:

> Hi,

> I am using amavis with spamassassin 3.0.3-2 for a Postfix/Cyrus IMAP 
> system on Debian sarge. I have inherited this system from another 
> administrator. I would like to ensure that Bayes filtering is working. 
> When I go to /var/lib/amavis/.spamassassin/ the bayes_seen database is 
> being regularly updated, but the bayes_toks database is not.

> Do I need to turn a setting on, or is this how this setup should be 
> functioning?

Check ownership of the files. The amavis user should own all the files
in that directory.

> I would also like to use sa-learn to teach the bayes filter about spam 
> and ham in certain mail folders. If I run sa-learn as root I of course 
> update the bayes_toks and bayes_seen database in /root/.spamassassin, 
> but I assume that Amavis/SA can not access it there.

You should always run sa-learn as the amavis user, e.g.:
su amavis -c 'sa-learn --spam /path/to/spam'

Of course, the amavis user will need to be able to read the files.

> I have made symbolic links to the bayes databases in
> /var/lib/amavis/.spamassassin although sa-learn seems to work, It 
> doesn't appear to have updated bayes_toks or bayes_seen.

I personally wouldn't do that. If you like, set this in local.cf:

bayes_path /var/lib/amavis/.spamassassin/bayes

Note that the bayes on the end is NOT a directory, it's the first half
of the name of the files that are created, as in:

bayes_toks
^^^^^

Once this is set, and you run sa-learn as root, root may take
ownership of the files, and you would then have to one again:
chown -R amavis:amavis /var/lib/amavis/.spamassassin

So it's possible to run sa-learn as root, if you change ownership back
to amavis immediately afterwards.

> What is the best way to use/configure sa-learn with my setup?

I suggest moving to SQL:
http://www200.pair.com/mecham/spam/debian-spamassassin-sql.html

With SQL, you can specify that the amavis user's data will get updated
regardless of who runs sa-learn by setting (for example):
bayes_sql_override_username amavis

It eliminates the file ownership issue.

> I hope I've given enough details, any help will be gratefully received.
> Kind regards,
> John

Gary V


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to