bayes problem {Scanned}
Glenn Steen
glenn.steen at gmail.com
Mon Oct 2 13:35:03 IST 2006
On 02/10/06, Henry Hollenberg <hgh at rcwm.com> wrote:
> Glenn Steen wrote:
> >>
> >> And where I expect to see something:
> >>
> >> X-gosemr-MailScanner-SpamCheck: spam, SpamAssassin (score=9.285,
> >> required 6,
> >> DCC_CHECK 1.37, DIGEST_MULTIPLE 0.23, FORGED_RCVD_HELO 0.05,
> >> RAZOR2_CF_RANGE_51_100 1.49, RAZOR2_CHECK 0.15, URIBL_JP_SURBL
> >> 4.00,
> >> URIBL_OB_SURBL 2.00)
> >>
> >> Am I jumping the gun?
> >>
> > Henry, I see you are using root here... (the telltale # prompt:)...
> > Can the postfix user find/read the bayes DB? Become your PF user and
> > redo that;-)...
> > su - postfix -s /bin/bash
> > sa-learn ...... whatever....
> >
>
> Ok, changed the permissions on /root/.spamassassin to postfix:postfix but
> still seem to be getting some errors. Don't see where to change the
> expected location of the bayes db in the config files.....got
> to get to work....I'll look around some more tonight!
>
> hgh.
>
>
> postfix at bastion:/root$ sa-learn --dump magic
> ERROR: Bayes dump returned an error, please re-run with -D for more information
> postfix at bastion:/root$ sa-learn -D --dump magic
(snip)
> debug: mkdir /var/spool/postfix/.spamassassin failed: mkdir /var/spool/postfix/.spamassassin: Permission denied at /usr/share/perl5/Mail/SpamAssassin.pm line 1453
> No such file or directory
As expected when run as postfix where ~postfix is a non-writable home
directory, this fails.
And then the following is just as expected.
>
> debug: bayes: no dbs present, cannot tie DB R/O: /var/spool/postfix/.spamassassin/bayes_toks
> debug: Score set 0 chosen.
> debug: bayes: no dbs present, cannot tie DB R/O: /var/spool/postfix/.spamassassin/bayes_toks
> ERROR: Bayes dump returned an error, please re-run with -D for more information
> postfix at bastion:/root$
>
What you need do is either to make sure there are adequate writable
subdirs in the home directory of the postfix user (.spamassassin,
.razor, .pyzor ... whatever:), or explicitly place these things
somewhere and tell the relevant subsystem/program where it is. For
Bayes, you might have
bayes_path /etc/MailScanner/bayes/bayes
bayes_file_mode 0770
in your /etc/mail/spamassassin/mailscanner.cf file (note that the
above should be a path to an existing directory + the leading
"fragment" of the filenames the bayes files are to have...).
If you have manually set a lot of ham/spam in _roots_ bayes files, you
could well just move them to the new location and chown/chmod them
appropriately. After that everything should be fine:).
Much (if not all) of this is mentioned in various places on the wiki etc etc.
--
-- Glenn
email: glenn < dot > steen < at > gmail < dot > com
work: glenn < dot > steen < at > ap1 < dot > se
More information about the MailScanner
mailing list