You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Miles Muri <mi...@circularlogic.ca> on 2005/12/24 05:00:44 UTC

Spamassassin Debug

I'm trying to work through a problem where network tests don't seem  
to be working.  Here's what I get from the debug on the command line:

BTW: SA 3.0.1 invoked through amavisd on Mac OS X Server 10.4.3


saskatoon:~ mmuri$ sa-learn --dump magic
ERROR: Bayes dump returned an error, please re-run with -D for more  
information
saskatoon:~ mmuri$ sa-learn -D --dump magic
debug: SpamAssassin version 3.0.1
debug: Score set 0 chosen.
debug: running in taint mode? yes
debug: Running in taint mode, removing unsafe env vars, and resetting  
PATH
debug: PATH included '/bin', keeping.
debug: PATH included '/sbin', keeping.
debug: PATH included '/usr/bin', keeping.
debug: PATH included '/usr/sbin', keeping.
debug: Final PATH set to: /bin:/sbin:/usr/bin:/usr/sbin
debug: using "/etc/mail/spamassassin/init.pre" for site rules init.pre
debug: config: read file /etc/mail/spamassassin/init.pre
debug: using "//usr/share/spamassassin" for default rules dir
debug: config: read file //usr/share/spamassassin/10_misc.cf
debug: config: read file //usr/share/spamassassin/20_anti_ratware.cf
debug: config: read file //usr/share/spamassassin/20_body_tests.cf
debug: config: read file //usr/share/spamassassin/20_compensate.cf
debug: config: read file //usr/share/spamassassin/20_dnsbl_tests.cf
debug: config: read file //usr/share/spamassassin/20_drugs.cf
debug: config: read file //usr/share/spamassassin/20_fake_helo_tests.cf
debug: config: read file //usr/share/spamassassin/20_head_tests.cf
debug: config: read file //usr/share/spamassassin/20_html_tests.cf
debug: config: read file //usr/share/spamassassin/20_meta_tests.cf
debug: config: read file //usr/share/spamassassin/20_phrases.cf
debug: config: read file //usr/share/spamassassin/20_porn.cf
debug: config: read file //usr/share/spamassassin/20_ratware.cf
debug: config: read file //usr/share/spamassassin/20_uri_tests.cf
debug: config: read file //usr/share/spamassassin/23_bayes.cf
debug: config: read file //usr/share/spamassassin/25_body_tests_es.cf
debug: config: read file //usr/share/spamassassin/25_body_tests_pl.cf
debug: config: read file //usr/share/spamassassin/25_hashcash.cf
debug: config: read file //usr/share/spamassassin/25_head_tests_es.cf
debug: config: read file //usr/share/spamassassin/25_head_tests_pl.cf
debug: config: read file //usr/share/spamassassin/25_spf.cf
debug: config: read file //usr/share/spamassassin/25_uribl.cf
debug: config: read file //usr/share/spamassassin/30_text_de.cf
debug: config: read file //usr/share/spamassassin/30_text_es.cf
debug: config: read file //usr/share/spamassassin/30_text_fr.cf
debug: config: read file //usr/share/spamassassin/30_text_it.cf
debug: config: read file //usr/share/spamassassin/30_text_nl.cf
debug: config: read file //usr/share/spamassassin/30_text_pl.cf
debug: config: read file //usr/share/spamassassin/30_text_sk.cf
debug: config: read file //usr/share/spamassassin/50_scores.cf
debug: config: read file //usr/share/spamassassin/60_whitelist.cf
debug: using "//etc/mail/spamassassin" for site rules dir
debug: config: read file //etc/mail/spamassassin/local.cf
debug: using "/Network/Servers/saskatoon.myserver.com/Users/ 
mmuri/.spamassassin/user_prefs" for user prefs file
debug: config: read file /Network/Servers/saskatoon.myserver.com/ 
Users/mmuri/.spamassassin/user_prefs
debug: plugin: loading Mail::SpamAssassin::Plugin::URIDNSBL from @INC
debug: plugin: registered Mail::SpamAssassin::Plugin::URIDNSBL=HASH 
(0x19250d8)
debug: plugin: loading Mail::SpamAssassin::Plugin::Hashcash from @INC
debug: plugin: registered Mail::SpamAssassin::Plugin::Hashcash=HASH 
(0x1b09198)
debug: plugin: loading Mail::SpamAssassin::Plugin::SPF from @INC
debug: plugin: registered Mail::SpamAssassin::Plugin::SPF=HASH 
(0x1a8bbfc)
debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x19250d8)  
implements 'parse_config'
debug: plugin: Mail::SpamAssassin::Plugin::Hashcash=HASH(0x1b09198)  
implements 'parse_config'
debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x19250d8)  
inhibited further callbacks
... last line repeated 33 times...

debug: config: SpamAssassin failed to parse line, skipping: auto_learn 1
debug: config: SpamAssassin failed to parse line, skipping:  
safe_reporting 0
debug: config: SpamAssassin failed to parse line, skipping:  
use_terse_report 0
debug: config: SpamAssassin failed to parse line, skipping:  
subject_tag *** Warning: Junk Mail ***
debug: config: SpamAssassin failed to parse line, skipping:  
rewrite_subject 0
debug: bayes: no dbs present, cannot tie DB R/O: /Network/Servers/ 
saskatoon.myserver.com/Users/mmuri/.spamassassin/bayes_toks
debug: Score set 0 chosen.
debug: bayes: no dbs present, cannot tie DB R/O: /Network/Servers/ 
saskatoon.myserver.com/Users/mmuri/.spamassassin/bayes_toks
ERROR: Bayes dump returned an error, please re-run with -D for more  
information


Miles Muri
miles@circularlogic.ca



Re: Spamassassin Debug

Posted by Miles Muri <mi...@circularlogic.ca>.
Here's what --lint shows (the same errors you pointed out, thanks)

saskatoon:/etc/mail/spamassassin root# spamassassin --lint
config: SpamAssassin failed to parse line, skipping: auto_learn 1
config: SpamAssassin failed to parse line, skipping: safe_reporting 0
config: SpamAssassin failed to parse line, skipping: use_terse_report 0
config: SpamAssassin failed to parse line, skipping: subject_tag ***  
Warning: Junk Mail ***
config: SpamAssassin failed to parse line, skipping: rewrite_subject 0
lint: 5 issues detected.  please rerun with debug enabled for more  
information.

I have fixed these now, but at least some of the local.cf settings  
seem to be overwritten when SA is invoked by amavisd. Here's the SA  
section in amavisd.conf

# SpamAssassin settings

# $sa_local_tests_only is passed to Mail::SpamAssassin::new as a value
# of the option local_tests_only. See Mail::SpamAssassin man page.
# If set to 1, no tests that require internet access will be performed.
#
$sa_local_tests_only = 0;   # (default: false)
#$sa_auto_whitelist = 1;    # turn on AWL (default: false)

$sa_mail_body_size_limit = 64*1024;  # don't waste time on SA if mail  
is larger
                             # (less than 1% of spam is > 64k)
                             # default: undef, no limitations

# default values, can be overridden by more specific lookups, e.g. SQL
$sa_tag_level_deflt  = -999; # add spam info headers if at, or above  
that level
$sa_tag2_level_deflt = 5.0; # add 'spam detected' headers at that level
$sa_kill_level_deflt = 22.0;
#$sa_kill_level_deflt = $sa_tag2_level_deflt; # triggers spam evasive  
actions
                             # at or above that level: bounce/reject/ 
drop,
                             # quarantine, and adding mail address  
extension
#
# The $sa_tag_level_deflt, $sa_tag2_level_deflt and $sa_kill_level_deflt
# may also be hashrefs to hash lookup tables, to make static per- 
recipient
# settings possible without having to resort to SQL or LDAP lookups.

# a quick reference:
#   tag_level  controls adding the X-Spam-Status and X-Spam-Level  
headers,
#   tag2_level controls adding 'X-Spam-Flag: YES', and editing Subject,
#   kill_level controls 'evasive actions' (reject, quarantine,  
extensions);
# it only makes sense to maintain the relationship:
# tag_level <= tag2_level <= kill_level

# string to prepend to Subject header field when message exceeds tag2  
level
$sa_spam_subject_tag = '*** JUNK MAIL ***';     # (defaults to undef,  
disables)
                              # (only seen when spam is not to be  
rejected
                              # and recipient is in local_domains*)

$sa_spam_modifies_subj = 1; # may be a ref to a lookup table, default  
is true

The config $sa_local_test_only was originally set to 1, but I changed  
that a while ago to no effect.

I'm now digging through the debug output that I have to see if there  
are any other trails to follow.

Many thanks,

Miles Muri
miles@circularlogic.ca

> At 11:00 PM 12/23/2005, Miles Muri wrote:
>> I'm trying to work through a problem where network tests don't seem
>> to be working.  Here's what I get from the debug on the command line:
>>
>> BTW: SA 3.0.1 invoked through amavisd on Mac OS X Server 10.4.3
>
>
>
>> saskatoon:~ mmuri$ sa-learn --dump magic
>> ERROR: Bayes dump returned an error, please re-run with -D for more
>> information
>> saskatoon:~ mmuri$ sa-learn -D --dump magic
>
>
> Based on the debug out, it sounds like your home directory of "/ 
> Network/Servers/ saskatoon.myserver.com/Users/mmuri/.spamassassin/ 
> bayes_toks" is unwritable. Check the permissions on  
> the .spamassassin directory.
>
>
>
> You also have a LOT of errors in your configuration, fix them and  
> run spamassassin --lint to make sure you got them all (lint should  
> just run and exit without printing anything)
>
>> debug: config: SpamAssassin failed to parse line, skipping:  
>> auto_learn 1
>
> auto_learn was replaced with bayes_auto_learn in SA 2.50
>
>> debug: config: SpamAssassin failed to parse line, skipping:
>> safe_reporting 0
>
> That's safe_report, not safe_reporting
>
>> debug: config: SpamAssassin failed to parse line, skipping:
>> use_terse_report 0
>
> Obsolete, this is superceded by the report_template commands
>
>> debug: config: SpamAssassin failed to parse line, skipping:
>> subject_tag *** Warning: Junk Mail ***
>
>
>> debug: config: SpamAssassin failed to parse line, skipping:
>> rewrite_subject 0
>
> subject_tag and rewrite_subject was replaced with rewrite_header  
> Subject in SA 3.0.0.
>
>
>


Re: Spamassassin Debug

Posted by Matt Kettler <mk...@comcast.net>.
At 11:00 PM 12/23/2005, Miles Muri wrote:
>I'm trying to work through a problem where network tests don't seem
>to be working.  Here's what I get from the debug on the command line:
>
>BTW: SA 3.0.1 invoked through amavisd on Mac OS X Server 10.4.3



>saskatoon:~ mmuri$ sa-learn --dump magic
>ERROR: Bayes dump returned an error, please re-run with -D for more
>information
>saskatoon:~ mmuri$ sa-learn -D --dump magic


Based on the debug out, it sounds like your home directory of 
"/Network/Servers/ 
saskatoon.myserver.com/Users/mmuri/.spamassassin/bayes_toks" is unwritable. 
Check the permissions on the .spamassassin directory.



You also have a LOT of errors in your configuration, fix them and run 
spamassassin --lint to make sure you got them all (lint should just run and 
exit without printing anything)

>debug: config: SpamAssassin failed to parse line, skipping: auto_learn 1

auto_learn was replaced with bayes_auto_learn in SA 2.50

>debug: config: SpamAssassin failed to parse line, skipping:
>safe_reporting 0

That's safe_report, not safe_reporting

>debug: config: SpamAssassin failed to parse line, skipping:
>use_terse_report 0

Obsolete, this is superceded by the report_template commands

>debug: config: SpamAssassin failed to parse line, skipping:
>subject_tag *** Warning: Junk Mail ***


>debug: config: SpamAssassin failed to parse line, skipping:
>rewrite_subject 0

subject_tag and rewrite_subject was replaced with rewrite_header Subject in 
SA 3.0.0.



Re: Spamassassin Debug

Posted by Richard Ozer <ro...@ois-online.com>.
I had a similar issue last week.  I had inadvertantly set the DNS to an 
internal DNS server with forwarders to the outside, rather than to a real 
outside DNS server.  Once I changed to a bona-fide outside DNS provider, all 
my network tests worked properly.

You also need to fix those invalid settings in your local.cf, although they 
are not causing the network lookup problems.

RO

----- Original Message ----- 
From: "Miles Muri" <mi...@circularlogic.ca>
To: <us...@spamassassin.apache.org>
Sent: Friday, December 23, 2005 8:00 PM
Subject: Spamassassin Debug


> I'm trying to work through a problem where network tests don't seem  to be 
> working.  Here's what I get from the debug on the command line:
>
> BTW: SA 3.0.1 invoked through amavisd on Mac OS X Server 10.4.3
>
>
> saskatoon:~ mmuri$ sa-learn --dump magic
> ERROR: Bayes dump returned an error, please re-run with -D for more 
> information
> saskatoon:~ mmuri$ sa-learn -D --dump magic
> debug: SpamAssassin version 3.0.1
> debug: Score set 0 chosen.
> debug: running in taint mode? yes
> debug: Running in taint mode, removing unsafe env vars, and resetting 
> PATH
> debug: PATH included '/bin', keeping.
> debug: PATH included '/sbin', keeping.
> debug: PATH included '/usr/bin', keeping.
> debug: PATH included '/usr/sbin', keeping.
> debug: Final PATH set to: /bin:/sbin:/usr/bin:/usr/sbin
> debug: using "/etc/mail/spamassassin/init.pre" for site rules init.pre
> debug: config: read file /etc/mail/spamassassin/init.pre
> debug: using "//usr/share/spamassassin" for default rules dir
> debug: config: read file //usr/share/spamassassin/10_misc.cf
> debug: config: read file //usr/share/spamassassin/20_anti_ratware.cf
> debug: config: read file //usr/share/spamassassin/20_body_tests.cf
> debug: config: read file //usr/share/spamassassin/20_compensate.cf
> debug: config: read file //usr/share/spamassassin/20_dnsbl_tests.cf
> debug: config: read file //usr/share/spamassassin/20_drugs.cf
> debug: config: read file //usr/share/spamassassin/20_fake_helo_tests.cf
> debug: config: read file //usr/share/spamassassin/20_head_tests.cf
> debug: config: read file //usr/share/spamassassin/20_html_tests.cf
> debug: config: read file //usr/share/spamassassin/20_meta_tests.cf
> debug: config: read file //usr/share/spamassassin/20_phrases.cf
> debug: config: read file //usr/share/spamassassin/20_porn.cf
> debug: config: read file //usr/share/spamassassin/20_ratware.cf
> debug: config: read file //usr/share/spamassassin/20_uri_tests.cf
> debug: config: read file //usr/share/spamassassin/23_bayes.cf
> debug: config: read file //usr/share/spamassassin/25_body_tests_es.cf
> debug: config: read file //usr/share/spamassassin/25_body_tests_pl.cf
> debug: config: read file //usr/share/spamassassin/25_hashcash.cf
> debug: config: read file //usr/share/spamassassin/25_head_tests_es.cf
> debug: config: read file //usr/share/spamassassin/25_head_tests_pl.cf
> debug: config: read file //usr/share/spamassassin/25_spf.cf
> debug: config: read file //usr/share/spamassassin/25_uribl.cf
> debug: config: read file //usr/share/spamassassin/30_text_de.cf
> debug: config: read file //usr/share/spamassassin/30_text_es.cf
> debug: config: read file //usr/share/spamassassin/30_text_fr.cf
> debug: config: read file //usr/share/spamassassin/30_text_it.cf
> debug: config: read file //usr/share/spamassassin/30_text_nl.cf
> debug: config: read file //usr/share/spamassassin/30_text_pl.cf
> debug: config: read file //usr/share/spamassassin/30_text_sk.cf
> debug: config: read file //usr/share/spamassassin/50_scores.cf
> debug: config: read file //usr/share/spamassassin/60_whitelist.cf
> debug: using "//etc/mail/spamassassin" for site rules dir
> debug: config: read file //etc/mail/spamassassin/local.cf
> debug: using "/Network/Servers/saskatoon.myserver.com/Users/ 
> mmuri/.spamassassin/user_prefs" for user prefs file
> debug: config: read file /Network/Servers/saskatoon.myserver.com/ 
> Users/mmuri/.spamassassin/user_prefs
> debug: plugin: loading Mail::SpamAssassin::Plugin::URIDNSBL from @INC
> debug: plugin: registered Mail::SpamAssassin::Plugin::URIDNSBL=HASH 
> (0x19250d8)
> debug: plugin: loading Mail::SpamAssassin::Plugin::Hashcash from @INC
> debug: plugin: registered Mail::SpamAssassin::Plugin::Hashcash=HASH 
> (0x1b09198)
> debug: plugin: loading Mail::SpamAssassin::Plugin::SPF from @INC
> debug: plugin: registered Mail::SpamAssassin::Plugin::SPF=HASH (0x1a8bbfc)
> debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x19250d8) 
> implements 'parse_config'
> debug: plugin: Mail::SpamAssassin::Plugin::Hashcash=HASH(0x1b09198) 
> implements 'parse_config'
> debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x19250d8) 
> inhibited further callbacks
> ... last line repeated 33 times...
>
> debug: config: SpamAssassin failed to parse line, skipping: auto_learn 1
> debug: config: SpamAssassin failed to parse line, skipping: 
> safe_reporting 0
> debug: config: SpamAssassin failed to parse line, skipping: 
> use_terse_report 0
> debug: config: SpamAssassin failed to parse line, skipping:  subject_tag 
> *** Warning: Junk Mail ***
> debug: config: SpamAssassin failed to parse line, skipping: 
> rewrite_subject 0
> debug: bayes: no dbs present, cannot tie DB R/O: /Network/Servers/ 
> saskatoon.myserver.com/Users/mmuri/.spamassassin/bayes_toks
> debug: Score set 0 chosen.
> debug: bayes: no dbs present, cannot tie DB R/O: /Network/Servers/ 
> saskatoon.myserver.com/Users/mmuri/.spamassassin/bayes_toks
> ERROR: Bayes dump returned an error, please re-run with -D for more 
> information
>
>
> Miles Muri
> miles@circularlogic.ca
>
>
>