SLQ Bayes
Steve Freegard
smf at F2S.COM
Thu Jun 9 13:27:38 IST 2005
Hi Dhawal,
I've amended the wiki entry - I think that 'bayes_sql_override_username'
should always be set as it is analogous to having 'bayes_path' and
'bayes_file_mode' set when using the dbm store.
Cheers,
Steve.
On Thu, 2005-06-09 at 16:28 +0530, Dhawal Doshy wrote:
> Thanks Steve for the excellent insight, i have amended the wiki accordingly.
>
> Do have a look at the wiki entry if you can spare some time.
> http://wiki.mailscanner.info/doku.php?id=documentation:anti_spam:spamassassin:bayes:sql
>
> - dhawal
>
> Pete Russell wrote:
> > Thank you fixed it instantly. Working beautifully now.
> >
> > Much appreciated.
> >
> > Pete
> >
> > Steve Freegard wrote:
> >
> >> Hi Pete,
> >>
> >> You need to add the line: 'bayes_sql_override_username root' to
> >> spam.assassin.pref.conf as SpamAssassin tracks bayes per user in the
> >> same database (similar to having the bayes files in the users home
> >> directory) so if you run sa-learn as postfix you'll get different
> >> results - this will also cause problems if you try and learn anything
> >> through MailWatch.
> >>
> >> You can manually 'see' which user you imported your files based bayes
> >> data into by connecting to the database that you created and running:
> >>
> >> mysql> SELECT id, username, spam_count, ham_count, token_count FROM
> >> bayes_vars;
> >> +----+----------+------------+-----------+-------------+
> >> | id | username | spam_count | ham_count | token_count |
> >> +----+----------+------------+-----------+-------------+
> >> | 2 | root | 190707 | 168166 | 124113 |
> >> | 3 | apache | 0 | 0 | 0 |
> >> +----+----------+------------+-----------+-------------+
> >> 2 rows in set (0.02 sec)
> >>
> >> It's probably worth putting this into the wiki - I would recommend
> >> setting the override _before_ the old data is imported as it saves
> >> hassle later.
> >>
> >> Hope this helps.
> >>
> >> Kind regards,
> >> Steve.
> >>
> >>
> >> On Thu, 2005-06-09 at 11:52 +1000, Peter Russell wrote:
> >>
> >>> Dhawal Doshy wrote:
> >>>
> >>>> Peter Russell wrote:
> >>>>
> >>>>
> >>>>> OK Thanks. But note. That the exact same Database produces a
> >>>>> different results about the amount fo ham or spam depending on
> >>>>> where you launch the lint from.
> >>>>>
> >>>>> IN MailScanner debug or mailwatch debug it says 36 nspams from
> >>>>> shell account as root it shows 19000 nspam.
> >>>>>
> >>>>> We store no mail on the gateway, this is a agteway fr
> >>>
> >>>
> >>> OM b1om Exchange and
> >>>
> >>>>> Domino.
> >>>>>
> >>>>> I still have the text dumps of the original bayes DBs.
> >>>>>
> >>>>> I will persevere with looking at MYSQL permissions.
> >>>>>
> >>>>> thanks
> >>>>> Pete
> >>>>>
> >>>>
> >>>> From sql/README.bayes: If you do not see the following lines
> >>>> something is likely to be misconfigured
> >>>>
> >>>> debug: bayes: Database connection established
> >>>> debug: bayes: Using username: <username>
> >>>>
> >>>> This being your case using MailScanner
> >>>> > debug: bayes: Database connection established
> >>>> > debug: bayes: found bayes db version 3
> >>>> > debug: bayes: Using userid: 4
> >>>> > debug: bayes: Not available for scanning, only 36 spam(s) in Bayes
> >>>> DB < 200
> >>>>
> >>>> MailScanner doesn't seem to be using the BayesSQL as mentioned in
> >>>> the sa.prefs.conf, IS mysql (and associated perl dbi/dbd libraries)
> >>>> available to the user MS in running under?
> >>>>
> >>>
> >>> Yeah when i run as root is works great when i log in as postfix (or
> >>> use the mailscanner debug) it doesnt work. I can connect to the
> >>> database using the credentials in the sa.prefs file sa_user and
> >>> localhost from the shell.
>
------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki (http://wiki.mailscanner.info/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
Support MailScanner development - buy the book off the website!
More information about the MailScanner
mailing list