Hello, 
I am trying to get MailScanner, Spamassassin, and ClamAV installed on a
freshly installed (emerged? :) gentoo linux box.

I have all three products installed ok, but I'm having a weird problem
w/the bayes db.  I also set up MailWatch, which has you move the bayes
db to /etc/MailScanner/bayes.

Since I installed from the MailScanner tarball, the bayes db is really
in /opt/MailScanner/etc/bayes.  I have created a symlink from
/opt/MailScanner/etc to /etc/MailScanner though, so it can be accessed
from either place.  Just to make sure that my symlink wasn't causing
problems though, I have configured MailScanner's
spam.asssassin.prefs.conf to point to the proper directory,
/opt/MailScanner/etc/bayes.

The problem is that whenever I run a --lint test, I get errors like
this:

debug: bayes: 25846 tie-ing to DB file R/O
/opt/MailScanner/etc/bayes_toks         0.2264
Cannot open bayes databases /opt/MailScanner/etc/bayes_* R/O: tie
failed: Permission denied

Here are the permissions on my bayes_toks file:
-rw-rw----  1 root apache 4739072 Jul 29 17:15
/opt/MailScanner/etc/bayes/bayes_toks

And on the /opt/MailScanner/etc/bayes dir:
drwxrwsr-x  2 root apache 77824 Jul 29 17:03 /opt/MailScanner/etc/bayes


In addition, I've noticed some other behaviour that I can't explain.
If I run this command as root:
Sa-learn -p /opt/MailScanner/etc/spam.assassin.prefs.conf -D --dump
magic

It tells me this:
debug: Score set 0 chosen.
debug: running in taint mode? no
debug: using "/usr/share/spamassassin" for default rules dir
debug: using "/etc/mail/spamassassin" for site rules dir
debug: using "/opt/MailScanner/etc/spam.assassin.prefs.conf" for user
prefs file
debug: bayes: 25940 tie-ing to DB file R/O
/opt/MailScanner/etc/bayes_toks
debug: bayes: 25940 tie-ing to DB file R/O
/opt/MailScanner/etc/bayes_seen
debug: bayes: found bayes db version 2
debug: bayes: Not available for scanning, only 9 spam(s) in Bayes DB <
200
debug: bayes: 25940 untie-ing
debug: bayes: 25940 untie-ing db_toks
debug: bayes: 25940 untie-ing db_seen
debug: Score set 0 chosen.
debug: Initialising learner
debug: bayes: 25940 tie-ing to DB file R/O
/opt/MailScanner/etc/bayes_toks
debug: bayes: 25940 tie-ing to DB file R/O
/opt/MailScanner/etc/bayes_seen
debug: bayes: found bayes db version 2
0.000          0          2          0  non-token data: bayes db version
0.000          0          9          0  non-token data: nspam
0.000          0          3          0  non-token data: nham
0.000          0       1377          0  non-token data: ntokens
0.000          0 1091126562          0  non-token data: oldest atime
0.000          0 1091134119          0  non-token data: newest atime
0.000          0          0          0  non-token data: last journal
sync atime
0.000          0          0          0  non-token data: last expiry
atime
0.000          0          0          0  non-token data: last expire
atime delta
0.000          0          0          0  non-token data: last expire
reduction count
debug: bayes: 25940 untie-ing
debug: bayes: 25940 untie-ing db_toks
debug: bayes: 25940 untie-ing db_seen
debug: bayes: 25940 untie-ing

As you can see, it doesn't have a problem tie-ing to the db this way.
If I run the same command as apache, I get the permission denied
messages.  The weird thing about the output above is that there should
be _WAY_ more than 9 spam messages.  I have other mail servers, and I do
an rsync of the bayes db from the "master" to keep the other ones
synchronized.  I've used this method on our other server for some time
w/out any problem, but on this machine.... I'm not really sure what it's
doing.

One other thing to add... If I login as the apache user, I can go into
the /opt/MailScanner/etc/bayes directory w/out any problems.  I can
touch files there, I can even open bayes_toks in vim w/out any
permission problems...

Anyone have any idea on why SA is giving me the permission denied
problems when I can login via the shell and change/read these files all
I want?

Any suggestions are greatly appreciated... I have set up these products
many times before on various RedHat and Fedora boxes w/out a problem,
and I'm not really sure what the issue is here.

Thanx!

k

Reply via email to