This is a discussion on Re: Bayes not running but no errors - SpamAssassin ; This is a multi-part message in MIME format. --------------020502060109030207000100 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hmm... I was checking around and I found a bug with apache that might be related, but wanted to run it by here first: The ...
This is a multi-part message in MIME format.
--------------020502060109030207000100
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Hmm... I was checking around and I found a bug with apache that might be
related, but wanted to run it by here first:
The bug is here:
https://issues.apache.org/SpamAssass...ug.cgi?id=5728
and is related to spamd using -u in conjunction with -q and/or -Q
I'm calling spamd with this command:
/usr/bin/perl -T -w /hsphere/shared/bin/spamd --max-children=5
--max-conn-per-child=5 --nouser-config --sql-config --username=vpopmail
--socketpath=/var/hsphere/mail/spamd --socketowner=vpopmail
--socketgroup=vchkpw --socketmode=770 --syslog-socket=none
If that changes anything...
spamc -u rachel@academicintl.com -q 32184 -Q 100000
Mitchell Hudson wrote:
> I tried both just to be sure, but neither changed the messages when I
> did a --lint.
>
> I noticed your dsn line was different than mine, so I tried changing
> it to localhost from :bayes_sql_dsn
> DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock
> But then it just didn't connect to the database at all. I went through
> and made sure I had the perl modules installed, and I did install
> Mail::SpamAssassin::BayesStore::MySQL, but I already had
> Mail::SpamAssassin::BayesStore::SQL installed.
>
> It seems to be connecting to the database great, it learns and I have
> a ton of tokens. But it's not pulling anything back out of the
> database ever. I grepped back through all of my sys logs to see if
> anything reported during all this testing but nothing showed up.
>
> As always, thanks
>
> Leveau Stanislas wrote:
>>
>> My conf for an old mysql version
>>
>> bayes_store_module Mail::SpamAssassin::BayesStore::*SQL*
>> bayes_sql_dsn DBI:mysql:spam:localhost
>>
>> for a recent mysql version
>>
>> bayes_store_module Mail::SpamAssassin::BayesStore::*MySQL*
>> bayes_sql_dsn DBI:mysql:spam:localhost
>>
>>
>> > Sure, I'll repaste the bayes portion, and include the rest of the file
>> > for good measure. Thanks again!
>> >
>> > # SpamAssassin config file for version 3.2x
>> > # Loading SpamAssassin User Preferences From An SQL Database
>> > user_scores_dsn
>> > DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock
>> > user_scores_sql_username spamassassin
>> > user_scores_sql_password ***
>> > # Using SpamAssassin Auto-Whitelists With An SQL Database
>> > use_auto_whitelist 1
>> > auto_whitelist_factory Mail::SpamAssassin::SQLBasedAddrList
>> > user_awl_dsn
>> > DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock
>> > user_awl_sql_username spamassassin
>> > user_awl_sql_password ***
>> > user_awl_sql_table awl
>> >
>> > # Using A SQL Database for Bayesian Storage Module
>> > use_bayes 1
>> > use_bayes_rules 1
>> > bayes_auto_learn 1
>> > bayes_store_module Mail::SpamAssassin::BayesStore::SQL
>> > bayes_sql_dsn
>> > DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock
>> > bayes_sql_username spamassassin
>> > bayes_sql_password ***
>> > bayes_min_ham_num 100
>> > bayes_min_spam_num 100
>> > bayes_learn_during_report 1
>> > bayes_expiry_max_db_size 180000
>> > bayes_auto_expire 0
>> > bayes_journal_max_size 102400
>> > bayes_learn_to_journal 0
>> > bayes_use_hapaxes 1
>> > bayes_sql_override_username spamassassin
>> >
>> > add_header all BayesScore _BAYES_
>> > add_header all TokenSummary _TOKENSUMMARY_
>> > add_header all Bayestc _BAYESTC_
>> > add_header all Bayestcleanred _BAYESTCLEARNED_
>> > add_header all bayestcspammy _BAYESTCSPAMMY_
>> > add_header all bayestchammy _BAYESTCHAMMY_
>> > add_header all bayestop5hammytokens _HAMMYTOKENS(5)_
>> > add_header all bayestop5spammytokens _SPAMMYTOKENS(5)_
>> > score BODY_ENHANCEMENT 5.0
>> > score BODY_ENHANCEMENT2 5.0
>> > score DRUGS_ERECTILE 20.0
>> > score FB_CIALIS_LEO3 5.0
>> > score FRT_LEVITRA 5.0
>> > score FUZZY_CPILL 5.0
>> > score FUZZY_VPILL 5.0
>> > score SARE_ADULT2 5.0
>> > score SARE_SXLIFE 5.0
>> > score SARE_WEOFFER 5.0
>> > score FB_ADD_INCHES 5.0
>> > #score RCVD_IN_NJABL_DUL 2.9
>> > #score RAZOR2_CF_RANGE_51_100 1.5
>> > score DATE_IN_FUTURE_03_06 3.5
>> > score DATE_IN_FUTURE_06_12 2.5
>> > score CHARSET_FARAWAY 6.0
>> > score CHARSET_FARAWAY_HEADER 6.0
>> > # How many hits before a message is considered spam.
>> > required_score 5.00
>> > # Text to prepend to subject if rewrite_subject is used
>> > rewrite_header Subject [SPAM]
>> > # Encapsulate spam in an attachment
>> > report_safe 0
>> > # Enable or disable network checks
>> > skip_rbl_checks 1
>> > # Mail using locales used in these country codes will not be marked
>> > # as being possibly spam in a foreign language.
>> > ok_locales all
>> > # All cusom directives may be added to
>> > /hsphere/local/config/mail/spamassassin/custom.cf
>> > include /hsphere/local/config/mail/spamassassin/custom.cf
>> >
>> >
>> > -- Mitch
>> >
>> >
>> >
>> > Leveau Stanislas wrote:
>> >> Hi
>> >>
>> >> Can you show us your spamassassin configuration : local.cf
>> >>
>> >> Thanks
>> >>
>> >>> Mitchell Hudson schrieb am 19.03.2008 18:18:
>> >>>
>> >>>> I have a few questions though, you said I am not using
>> >>>> bayes_sql_override_username but I have
>> >>>> "bayes_sql_override_username spamassassin " in my config, does
>> >>>> that not count?
>> >>>
>> >>> I'm sorry, I overlooked that. Yes, in the configuration that you
>> posted
>> >>> it was set. And I also told rubbish by claiming that you ran
>> under the
>> >>> username root. SA reported the internal userid from the sql
>> table, and
>> >>> that was probably the user 'spamassassin'.
>> >>>
>> >>>> As well I tried setting the min_ham and min_spam to 1 just for a
>> >>>> short test, and took out the bayes_sql_override_username and it
>> >>>> wasn't calling. When I did the use spamassassin; select * from
>> >>>> bayes_vars; I did get a list of people, but they have very few
>> >>>> tokens, in the order of 1 or 2 which looks to me like those
>> >>>> tokens were created when I was tinkering and removed the
>> >>>> sql_override_username, otherwise everything is put into the
>> >>>> spamassassin user which has a few hundred thousand tokens in it
>> >>>> currently.
>> >>>
>> >>> Yes, that's a valid explanation. Sorry for the confusion from my
>> part.
>> >>> But that leads us back to your question: "why it is not
>> scoring?". Did
>> >>> you really found all bayes-related output from --lint? If I run a
>> >>> "spamassassin --lint -D 2>&1|grep -i bayes", I get more bayes-related
>> >>> output:
>> >>>
>> >>> [21631] dbg: plugin: loading Mail::SpamAssassin::Plugin::Bayes
>> from @INC
>> >>> [21631] dbg: config: fixed relative path:
>> >>> /var/lib/spamassassin/3.002004/updates_spamassassin_org/23_bayes.cf
>> >>> [21631] dbg: config: using
>> >>> "/var/lib/spamassassin/3.002004/updates_spamassassin_org/23_bayes.cf"
>> >>> for included file
>> >>> [21631] dbg: config: read file
>> >>> /var/lib/spamassassin/3.002004/updates_spamassassin_org/23_bayes.cf
>> >>> [21631] dbg: bayes: using username: mail
>> >>> [21631] dbg: bayes: database connection established
>> >>> [21631] dbg: bayes: found bayes db version 3
>> >>> [21631] dbg: bayes: Using userid: 2
>> >>> [21631] dbg: bayes: corpus size: nspam = 214240, nham = 138319
>> >>> [21631] dbg: bayes: tok_get_all: token count: 21
>> >>> [21631] dbg: bayes: score = 0.0020110638266459
>> >>> [21631] dbg: bayes: DB expiry: tokens in DB: 461680, Expiry max size:
>> >>> 500000, Oldest atime: 1203126859, Newest atime: 1205950517, Last
>> >>> expire: 1205444421, Current time: 1205950517
>> >>> [21631] dbg: rules: ran eval rule BAYES_00 ======> got hit (1)
>> >>> [21631] dbg: check:
>> >>>
>> tests=BAYES_00,MISSING_DATE,MISSING_HEADERS,MISSIN G_SUBJECT,NO_RECEIVED,NO_RELAYS
>> I am using Mysql as
>> >>> database.
>> >>>
>> >>> Tschau
>> >>> Alex
>> >>
>> >>
>> >>
>>
>
> --
> --
> Mitchell Hudson
> Systems Administrator
> Front Gate Solutions
> 1711 S Congress Ave
> Austin, TX 78704
> P: 512-674-9337
> C: 512-587-0918
> F: 512-499-0440
> Mitchell@FrontGateSolutions.com
--
--
Mitchell Hudson
Systems Administrator
Front Gate Solutions
1711 S Congress Ave
Austin, TX 78704
P: 512-674-9337
C: 512-587-0918
F: 512-499-0440
Mitchell@FrontGateSolutions.com
--------------020502060109030207000100
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Hmm... I was checking around and I found a bug with apache that might
be related, but wanted to run it by here first:
The bug is here:
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5728
and is related to spamd using -u in conjunction with -q and/or -Q
I'm calling spamd with this command:
/usr/bin/perl -T -w /hsphere/shared/bin/spamd --max-children=5
--max-conn-per-child=5 --nouser-config --sql-config --username=vpopmail
--socketpath=/var/hsphere/mail/spamd --socketowner=vpopmail
--socketgroup=vchkpw --socketmode=770 --syslog-socket=none
If that changes anything...
spamc -u rachel@academicintl.com -q 32184 -Q 100000
Mitchell Hudson wrote:
type="cite">
I tried both just to be sure, but neither changed the messages when I
did a --lint.
I noticed your dsn line was different than mine, so I tried changing it
to localhost from :bayes_sql_dsn
DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock
But then it just didn't connect to the database at all. I went through
and made sure I had the perl modules installed, and I did install
Mail::SpamAssassin::BayesStore::MySQL, but I already had
Mail::SpamAssassin::BayesStore::SQL installed.
It seems to be connecting to the database great, it learns and I have a
ton of tokens. But it's not pulling anything back out of the database
ever. I grepped back through all of my sys logs to see if anything
reported during all this testing but nothing showed up.
As always, thanks
Leveau Stanislas wrote:
type="cite">
My conf for an old mysql version
bayes_store_module Mail::SpamAssassin::BayesStore::SQL
bayes_sql_dsn DBI:mysql:spam:localhost
for a recent mysql version
bayes_store_module Mail::SpamAssassin::BayesStore::MySQL
bayes_sql_dsn DBI:mysql:spam:localhost
> Sure, I'll repaste the bayes portion, and include the rest of the
file
> for good measure. Thanks again!
>
> # SpamAssassin config file for version 3.2x
> # Loading SpamAssassin User Preferences From An SQL Database
> user_scores_dsn
> DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock
> user_scores_sql_username spamassassin
> user_scores_sql_password ***
> # Using SpamAssassin Auto-Whitelists With An SQL Database
> use_auto_whitelist 1
> auto_whitelist_factory Mail::SpamAssassin::SQLBasedAddrList
> user_awl_dsn
> DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock
> user_awl_sql_username spamassassin
> user_awl_sql_password ***
> user_awl_sql_table awl
>
> # Using A SQL Database for Bayesian Storage Module
> use_bayes 1
> use_bayes_rules 1
> bayes_auto_learn 1
> bayes_store_module Mail::SpamAssassin::BayesStore::SQL
> bayes_sql_dsn
> DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock
> bayes_sql_username spamassassin
> bayes_sql_password ***
> bayes_min_ham_num 100
> bayes_min_spam_num 100
> bayes_learn_during_report 1
> bayes_expiry_max_db_size 180000
> bayes_auto_expire 0
> bayes_journal_max_size 102400
> bayes_learn_to_journal 0
> bayes_use_hapaxes 1
> bayes_sql_override_username spamassassin
>
> add_header all BayesScore _BAYES_
> add_header all TokenSummary _TOKENSUMMARY_
> add_header all Bayestc _BAYESTC_
> add_header all Bayestcleanred _BAYESTCLEARNED_
> add_header all bayestcspammy _BAYESTCSPAMMY_
> add_header all bayestchammy _BAYESTCHAMMY_
> add_header all bayestop5hammytokens _HAMMYTOKENS(5)_
> add_header all bayestop5spammytokens _SPAMMYTOKENS(5)_
> score BODY_ENHANCEMENT 5.0
> score BODY_ENHANCEMENT2 5.0
> score DRUGS_ERECTILE 20.0
> score FB_CIALIS_LEO3 5.0
> score FRT_LEVITRA 5.0
> score FUZZY_CPILL 5.0
> score FUZZY_VPILL 5.0
> score SARE_ADULT2 5.0
> score SARE_SXLIFE 5.0
> score SARE_WEOFFER 5.0
> score FB_ADD_INCHES 5.0
> #score RCVD_IN_NJABL_DUL 2.9
> #score RAZOR2_CF_RANGE_51_100 1.5
> score DATE_IN_FUTURE_03_06 3.5
> score DATE_IN_FUTURE_06_12 2.5
> score CHARSET_FARAWAY 6.0
> score CHARSET_FARAWAY_HEADER 6.0
> # How many hits before a message is considered spam.
> required_score 5.00
> # Text to prepend to subject if rewrite_subject is used
> rewrite_header Subject [SPAM]
> # Encapsulate spam in an attachment
> report_safe 0
> # Enable or disable network checks
> skip_rbl_checks 1
> # Mail using locales used in these country codes will not be marked
> # as being possibly spam in a foreign language.
> ok_locales all
> # All cusom directives may be added to
> /hsphere/local/config/mail/spamassassin/custom.cf
> include /hsphere/local/config/mail/spamassassin/custom.cf
>
>
> -- Mitch
>
>
>
> Leveau Stanislas wrote:
>> Hi
>>
>> Can you show us your spamassassin configuration : local.cf
>>
>> Thanks
>>
>>> Mitchell Hudson schrieb am 19.03.2008 18:18:
>>>
>>>> I have a few questions though, you said I am not
using
>>>> bayes_sql_override_username but I have
>>>> "bayes_sql_override_username spamassassin " in my
config, does
>>>> that not count?
>>>
>>> I'm sorry, I overlooked that. Yes, in the configuration
that you
posted
>>> it was set. And I also told rubbish by claiming that you
ran under
the
>>> username root. SA reported the internal userid from the
sql table,
and
>>> that was probably the user 'spamassassin'.
>>>
>>>> As well I tried setting the min_ham and min_spam to 1
just for
a
>>>> short test, and took out the
bayes_sql_override_username and
it
>>>> wasn't calling. When I did the use spamassassin;
select * from
>>>> bayes_vars; I did get a list of people, but they have
very few
>>>> tokens, in the order of 1 or 2 which looks to me like
those
>>>> tokens were created when I was tinkering and removed
the
>>>> sql_override_username, otherwise everything is put
into the
>>>> spamassassin user which has a few hundred thousand
tokens in
it
>>>> currently.
>>>
>>> Yes, that's a valid explanation. Sorry for the confusion
from my
part.
>>> But that leads us back to your question: "why it is not
scoring?". Did
>>> you really found all bayes-related output from --lint? If
I run
a
>>> "spamassassin --lint -D 2>&1|grep -i bayes", I get
more bayes-related
>>> output:
>>>
>>> [21631] dbg: plugin: loading
Mail::SpamAssassin::Plugin::Bayes from
@INC
>>> [21631] dbg: config: fixed relative path:
>>>
/var/lib/spamassassin/3.002004/updates_spamassassin_org/23_bayes.cf
>>> [21631] dbg: config: using
>>>
"/var/lib/spamassassin/3.002004/updates_spamassassin_org/23_bayes.cf"
>>> for included file
>>> [21631] dbg: config: read file
>>>
/var/lib/spamassassin/3.002004/updates_spamassassin_org/23_bayes.cf
>>> [21631] dbg: bayes: using username: mail
>>> [21631] dbg: bayes: database connection established
>>> [21631] dbg: bayes: found bayes db version 3
>>> [21631] dbg: bayes: Using userid: 2
>>> [21631] dbg: bayes: corpus size: nspam = 214240, nham =
138319
>>> [21631] dbg: bayes: tok_get_all: token count: 21
>>> [21631] dbg: bayes: score = 0.0020110638266459
>>> [21631] dbg: bayes: DB expiry: tokens in DB: 461680,
Expiry max
size:
>>> 500000, Oldest atime: 1203126859, Newest atime:
1205950517, Last
>>> expire: 1205444421, Current time: 1205950517
>>> [21631] dbg: rules: ran eval rule BAYES_00 ======> got
hit
(1)
>>> [21631] dbg: check:
>>>
tests=BAYES_00,MISSING_DATE,MISSING_HEADERS,MISSIN G_SUBJECT,NO_RECEIVED,NO_RELAYS
I am using Mysql as
>>> database.
>>>
>>> Tschau
>>> Alex
>>
>>
>>
--
--
Mitchell Hudson
Systems Administrator
Front Gate Solutions
1711 S Congress Ave
Austin, TX 78704
P: 512-674-9337
C: 512-587-0918
F: 512-499-0440
href="mailto:Mitchell@FrontGateSolutions.com">Mitchell@FrontGateSolutions.com
--
--
Mitchell Hudson
Systems Administrator
Front Gate Solutions
1711 S Congress Ave
Austin, TX 78704
P: 512-674-9337
C: 512-587-0918
F: 512-499-0440
Mitchell@FrontGateSolutions.com