Trouble with Bayes

Martin martin.lyberg at gmail.com
Thu Aug 31 09:10:00 IST 2006


Glenn Steen wrote:

> Right. And as the postfix user, doing a
> spamassassin --lint -D 2>&1 | less -e
> everything works as expected, right?
> Is that lint snippet from MailWatch, perhaps? In that case, you need
> do the same test for the apache user (whatever that is on your system.
> It is "apache" on mine:).

Yes, but i had to add -p /etc/MailScanner/spam.assassin.prefs.conf for 
it to pick up the right conf-file.

You're right that the snippet in my post was made from Mailwatch 
webadmin. If i do it from the commandline as the postfix-user i get this:

spamassassin -p /etc/MailScanner/spam.assassin.prefs.conf --lint -D 2>&1 
| less -e:

[9298] dbg: bayes: tie-ing to DB file R/O 
/var/spool/MailScanner/spamassassin/bayes_toks
[9298] dbg: bayes: tie-ing to DB file R/O 
/var/spool/MailScanner/spamassassin/bayes_seen
[9298] dbg: bayes: found bayes db version 3
[9298] dbg: bayes: DB journal sync: last sync: 0
[9298] dbg: bayes: not available for scanning, only 86 spam(s) in bayes 
DB < 200
[9298] dbg: bayes: untie-ing
[9298] dbg: bayes: untie-ing db_toks
[9298] dbg: bayes: untie-ing db_seen

So it seem to work as it should when doing it this way. Could it be that 
Mailwatch is using some other user when linting from the web-admin?

  > The way to get everything to work with Postfix and MailWatch (if that
> is the problem) is to make the necessary parts run as postfix:apache,
> and adjust the group rights accordingly.
> On a system near me I've got:
> drwxrwsrwx  2 postfix apache     4096 aug 30 15:28 ./
> drwxr-xr-x  7 root    root       4096 aug 30 04:12 ../
> -rw-rw----  1 postfix apache    76440 aug 30 15:27 bayes_journal
> -rw-rw----  1 postfix apache     1200 aug 30 15:27 bayes.mutex
> -rw-rw----  1 postfix apache 20971520 aug 30 15:27 bayes_seen
> -rw-rw----  1 postfix apache  5111808 aug 30 15:27 bayes_toks
> 
> ... with
> Run As User = postfix
> Run As Group = postfix
> Quarantine User = postfix
> Quarantine Group = apache
> Incoming Work Permissions = 0660
> Quarantine Permissions = 0660
> ... in /etc/MailScanner.conf, and
> bayes_path /etc/MailScanner/bayes/bayes
> bayes_file_mode 0770
> ... in /etc/mail/spamassassin/mailscanner.cf (softlink to
> spam.assassin.prefs.conf).

I have the following in my MailScanner.conf:

Quarantine User = postfix
Quarantine Group = www-data
Quarantine Permissions = 0660

Run As User = postfix
Run As Group = postfix
Incoming Work Permissions = 0600

I can't see any error here? Clues?

Thank you

/ Martin



More information about the MailScanner mailing list