How do I get this set up?
spamassassin -D --lint
shows me an error...
debug: bayes: no dbs present, cannot tie DB R/O: /root/.spamassassin/bayes_toks
and with no db present, it doesn't learn.
Is there something simple that I'm missing?
Craig
Craig White wrote:
How do I get this set up?
spamassassin -D --lint
shows me an error...
debug: bayes: no dbs present, cannot tie DB R/O: /root/.spamassassin/bayes_toks
and with no db present, it doesn't learn.
Is there something simple that I'm missing?
Just a shot in the dark, does the directory, "/root/.spamassassin/" exist? And if so, is it writable?
--Ajay
On Thu, 2005-03-31 at 09:27 -0800, Ajay Sharma wrote:
Craig White wrote:
How do I get this set up?
spamassassin -D --lint
shows me an error...
debug: bayes: no dbs present, cannot tie DB R/O: /root/.spamassassin/bayes_toks
and with no db present, it doesn't learn.
Is there something simple that I'm missing?
Just a shot in the dark, does the directory, "/root/.spamassassin/" exist? And if so, is it writable?
---- # ls -ld /root/.spamassassin/ drwx------ 2 root root 4096 Mar 31 10:04 /root/.spamassassin/ # ls -l /root/.spamassassin/ total 12 -rw------- 1 root root 12288 Mar 31 10:04 auto-whitelist -rw-r--r-- 1 root root 1165 Mar 25 17:55 user_prefs
yes and yes - spamassassin is running as root (not sure of the wisdom of that but I haven't changed it)...
# ps aux|grep spam root 20711 0.0 0.0 26672 132 ? S Mar25 0:00 /usr/bin/spamd -d -c -m5 -H root 20714 0.0 0.0 26672 132 ? S Mar25 0:00 spamd child root 20715 0.0 0.0 26672 132 ? S Mar25 0:00 spamd child root 20716 0.0 0.0 26672 136 ? S Mar25 0:00 spamd child root 20717 0.0 0.0 26672 156 ? S Mar25 0:00 spamd child root 20718 0.0 0.0 26672 168 ? S Mar25 0:00 spamd child root 32312 0.0 0.0 3856 576 pts/0 S 10:32 0:00 grep spam
Craig
Craig White wrote:
How do I get this set up?
spamassassin -D --lint
shows me an error...
debug: bayes: no dbs present, cannot tie DB R/O: /root/.spamassassin/bayes_toks
and with no db present, it doesn't learn.
Is there something simple that I'm missing?
[also related to your reply to Ajay's mail]
If spamd is running as root, and you want to use spamd, than you should use spamc utility to connect to it. spamassassin is stand-alone, it doesn't utilize spamd. If spamd is running as root, it will assume identity of connecting user (the one who run spamc utility).
Now, do you want to have per-user bayes databases, or one global database? Do you connect to spamd as user or from some daemon, and does that daemon uses smapd or has copy its own copy of spamassassin (like mimedefang)?
I'm affraid you'll have to give much more details...
On Thu, 2005-03-31 at 12:16 -0600, Aleksandar Milivojevic wrote:
Craig White wrote:
How do I get this set up?
spamassassin -D --lint
shows me an error...
debug: bayes: no dbs present, cannot tie DB R/O: /root/.spamassassin/bayes_toks
and with no db present, it doesn't learn.
Is there something simple that I'm missing?
[also related to your reply to Ajay's mail]
If spamd is running as root, and you want to use spamd, than you should use spamc utility to connect to it. spamassassin is stand-alone, it doesn't utilize spamd. If spamd is running as root, it will assume identity of connecting user (the one who run spamc utility).
Now, do you want to have per-user bayes databases, or one global database? Do you connect to spamd as user or from some daemon, and does that daemon uses smapd or has copy its own copy of spamassassin (like mimedefang)?
I'm affraid you'll have to give much more details...
---- OK - perhaps my question should have been directed to 'MailScanner' list
My usage is for company owned/operated mail servers and my specialty is 5 - 50 users on the network
Thus, I am thinking that it should be a global database
I am using MailScanner and it seems to be the 'caller' of spamassassin. Spamassassin evaluates and scores the incoming mails and MailScanner appropriately tags the header and sieve will direct the 5+ scores into the users SPAM folder.
Craig
Craig White wrote:
OK - perhaps my question should have been directed to 'MailScanner' list
My usage is for company owned/operated mail servers and my specialty is 5 - 50 users on the network
Thus, I am thinking that it should be a global database
I am using MailScanner and it seems to be the 'caller' of spamassassin. Spamassassin evaluates and scores the incoming mails and MailScanner appropriately tags the header and sieve will direct the 5+ scores into the users SPAM folder.
Would love to help you there, but my scanner of choice is MIMEDefang, and I don't know exactly how MailScanner is using SpamAssassin. For example, MIMEDefang uses its own configuration file for SpamAssassin (not default one) called sa-mimedefang.cf. In that file to use system wide autowhitelisting and bayes, one would place something along the lines:
#Enable AWL use_auto_whitelist 1 auto_whitelist_path /var/spool/MIMEDefang/mimedefang-autowhitelist auto_whitelist_file_mode 0640
#Enable Bayes use_bayes 1 use_bayes_rules 1 bayes_path /var/spool/MIMEDefang/mimedefang-bayes bayes_file_mode 0640 bayes_auto_learn 1 bayes_auto_learn_threshold_nonspam 0.0 bayes_auto_learn_threshold_spam 15.0
I know this is example how to get it working in something completely different, but hopefully it might provide some ideas to solve problem in your case too. As you said, MailScanner list might give you more usefull answers...
On Fri, 2005-04-01 at 08:35 -0600, Aleksandar Milivojevic wrote:
Craig White wrote:
OK - perhaps my question should have been directed to 'MailScanner' list
My usage is for company owned/operated mail servers and my specialty is 5 - 50 users on the network
Thus, I am thinking that it should be a global database
I am using MailScanner and it seems to be the 'caller' of spamassassin. Spamassassin evaluates and scores the incoming mails and MailScanner appropriately tags the header and sieve will direct the 5+ scores into the users SPAM folder.
Would love to help you there, but my scanner of choice is MIMEDefang, and I don't know exactly how MailScanner is using SpamAssassin. For example, MIMEDefang uses its own configuration file for SpamAssassin (not default one) called sa-mimedefang.cf. In that file to use system wide autowhitelisting and bayes, one would place something along the lines:
#Enable AWL use_auto_whitelist 1 auto_whitelist_path /var/spool/MIMEDefang/mimedefang-autowhitelist auto_whitelist_file_mode 0640
#Enable Bayes use_bayes 1 use_bayes_rules 1 bayes_path /var/spool/MIMEDefang/mimedefang-bayes bayes_file_mode 0640 bayes_auto_learn 1 bayes_auto_learn_threshold_nonspam 0.0 bayes_auto_learn_threshold_spam 15.0
I know this is example how to get it working in something completely different, but hopefully it might provide some ideas to solve problem in your case too. As you said, MailScanner list might give you more usefull answers...
---- Yeah - I'm an idiot -
from /etc/MailScanner/spam.assassin.prefs.conf
# =============== MailScanner: spam.assassin.prefs.conf =============== # Version 2.13.1
# SpamAssassin preferences for MailScanner users should be placed in # this file to avoid being overwritten by a SpamAssassin upgrade. # For a complete listing of configurable parameters, please see:
# http://www.spamassassin.org/doc/Mail_SpamAssassin_Conf.html
# =============== SpamAssassin Preferences =============== # # the file installed by SpamAssassin:
# /etc/mail/spamassassin/local.cf
# Should be disabled # typically use these commands:
# mv /etc/mail/spamassassin/local.cf \ # /etc/mail/spamassassin/local.cf.saved
# When running SpamAssassin or sa-learn from the command line, # or a script, you should always specify that SpamAssassin use # this file to load SpamAssassin preferences, i.e:
# sa-learn --ham -p /etc/MailScanner/spam.assassin.prefs.conf \ # --mbox ham_mbox
# spamassassin -D -p etc/MailScanner/spam.assassin.prefs.conf \ # --lint
---- duh - so it has been working but I couldn't tell because when I tested from command line, it went to non-operative local.cf file.
what I did discover and will report for those who might follow in my tracks...
I updated to Dag's version of spamassassin, installed spamassassin-tools (installed some spamassassin plugins that were used by MailScanner)
I moved /etc/mail/spamassassin/local.cf to /etc/mail/spamassassin/local.cf.saved #finally decided to RTFM
set path for bayes in /etc/MailScanner/spam.assassin.prefs.conf bayes_path /etc/MailScanner/bayes/bayes
downloaded starter bayes for SA 3.0 from SFL... http://www.fsl.com/support/bayes-Linux-SA-3.0-starter-db.tar.gz
untarred it in /etc/MailScanner/bayes
restarted MailScanner and was good to go.
More to follow
Thanks
Craig
On Thu, Mar 31, 2005 at 10:08:40AM -0700, Craig White wrote:
How do I get this set up?
spamassassin -D --lint
shows me an error...
debug: bayes: no dbs present, cannot tie DB R/O: /root/.spamassassin/bayes_toks
and with no db present, it doesn't learn.
Is there something simple that I'm missing?
If you run spamassassin in daemon mode it drops root priviledges and run as nobody. So you need:
chmod o+x /root chown .nobody /root/.spamassassin chmod 770 /root/.spamassassin
Or better - use onother directory for spamassassin config files.
You can get a good starter bayes DB here:
http://www.fsl.com/support/index.html
Mike
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Craig White Sent: Thursday, March 31, 2005 11:09 AM To: CentOS mailing list Subject: [CentOS] spamassassin - sa-learn
How do I get this set up?
spamassassin -D --lint
shows me an error...
debug: bayes: no dbs present, cannot tie DB R/O: /root/.spamassassin/bayes_toks
and with no db present, it doesn't learn.
Is there something simple that I'm missing?
Craig
_______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Fri, 2005-04-01 at 08:52 -0600, Mike Kercher wrote:
You can get a good starter bayes DB here:
---- yeah - that was certainly part of the fix - to be sure
I still needed to figure out how to make MailScanner (hence spamassassin) to use it and where to locate it.
Thanks
Craig