You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Rich Shepard <rs...@appl-ecosys.com> on 2007/01/24 16:25:38 UTC

Fixing Broken Rules

   When I run spamassassin --lint I see a number of rule-related warnings.
However, when I look in /etc/mail/spamassassin/rules/ I can't find the
specific text referenced.

   Here's the pertinent lint output:

[22906] warn: config: SpamAssassin failed to parse line,
"DNS_FROM_AHBL_RHSBL .4" is not valid for "score", skipping: score
DNS_FROM_AHBL_RHSBL .4
[22906] warn: config: SpamAssassin failed to parse line, "DNS_FROM_RFC_ABUSE
.4" is not valid for "score", skipping: score DNS_FROM_RFC_ABUSE .4
[22906] warn: config: SpamAssassin failed to parse line,
"DNS_FROM_RFC_BOGUSMX .4" is not valid for "score", skipping: score
DNS_FROM_RFC_BOGUSMX .4
[22906] warn: config: SpamAssassin failed to parse line, "DNS_FROM_RFC_DSN
.4" is not valid for "score", skipping: score DNS_FROM_RFC_DSN .4
[22906] warn: config: SpamAssassin failed to parse line, "DNS_FROM_RFC_POST
.4" is not valid for "score", skipping: score DNS_FROM_RFC_POST .4
[22906] warn: config: SpamAssassin failed to parse line, "DNS_FROM_RFC_WHOIS
.4" is not valid for "score", skipping: score DNS_FROM_RFC_WHOIS .4

   When I grep for the entire string -- including the score -- I get no hits.
The DNS rules are in 20_dnsbl_tests.cf.

Rich

-- 
Richard B. Shepard, Ph.D.               |    The Environmental Permitting
Applied Ecosystem Services, Inc.        |          Accelerator(TM)
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863

Re: Fixing Broken Rules

Posted by Adam Lanier <ad...@krusty.madoff.com>.
On Wed, 2007-01-24 at 07:25 -0800, Rich Shepard wrote:
>    When I run spamassassin --lint I see a number of rule-related warnings.
> However, when I look in /etc/mail/spamassassin/rules/ I can't find the
> specific text referenced.
> 
>    Here's the pertinent lint output:
<snip>

Unless you've installed them in non-standard places, the rules should be
in:

/etc/mail/spamassassin
/usr/share/spamassassin
/var/lib/spamassassin/<SA_VERSION>/updates_spamassassin_org

[root@skinner reports]# grep
DNS_FROM_AHBL_RHSBL /var/lib/spamassassin/3.001007/updates_spamassassin_org/*
/var/lib/spamassassin/3.001007/updates_spamassassin_org/20_dnsbl_tests.cf:header DNS_FROM_AHBL_RHSBL    eval:check_rbl_envfrom('ahbl', 'rhsbl.ahbl.org.')
/var/lib/spamassassin/3.001007/updates_spamassassin_org/20_dnsbl_tests.cf:describe DNS_FROM_AHBL_RHSBL  From: sender listed in dnsbl.ahbl.org
/var/lib/spamassassin/3.001007/updates_spamassassin_org/20_dnsbl_tests.cf:tflags DNS_FROM_AHBL_RHSBL    net
/var/lib/spamassassin/3.001007/updates_spamassassin_org/20_dnsbl_tests.cf:#reuse DNS_FROM_AHBL_RHSBL
/var/lib/spamassassin/3.001007/updates_spamassassin_org/30_text_de.cf:lang de describe DNS_FROM_AHBL_RHSBL Absenderadresse in Liste von dnsbl.ahbl.org
/var/lib/spamassassin/3.001007/updates_spamassassin_org/50_scores.cf:score DNS_FROM_AHBL_RHSBL 0 0.306 0 0.231
[root@skinner reports]# grep
DNS_FROM_AHBL_RHSBL /usr/share/spamassassin/*
/usr/share/spamassassin/20_dnsbl_tests.cf:header DNS_FROM_AHBL_RHSBL
eval:check_rbl_envfrom('ahbl', 'rhsbl.ahbl.org.')
/usr/share/spamassassin/20_dnsbl_tests.cf:describe DNS_FROM_AHBL_RHSBL
From: sender listed in dnsbl.ahbl.org
/usr/share/spamassassin/20_dnsbl_tests.cf:tflags DNS_FROM_AHBL_RHSBL
net
/usr/share/spamassassin/20_dnsbl_tests.cf:#reuse DNS_FROM_AHBL_RHSBL
/usr/share/spamassassin/30_text_de.cf:lang de describe
DNS_FROM_AHBL_RHSBL Absenderadresse in Liste von dnsbl.ahbl.org
/usr/share/spamassassin/50_scores.cf:score DNS_FROM_AHBL_RHSBL 0 0.306 0
0.231

Re: Fixing Broken Rules -- FIXED!

Posted by Rich Shepard <rs...@appl-ecosys.com>.
On Wed, 24 Jan 2007, Adam Lanier wrote:

> Did you do a grep for 'DNS_FROM_AHBL_RHSBL' (for example)
> in /etc/mail/spamassassin?

Adam,

   I _thought_ that I had, but I'm trying to simultaneously fix problems with
three applications, so I missed doing this.

> I'm betting you have a 'score DNS_FROM_AHBL_RHSBL .4' in local.cf or some
> other cf file in that directory.

   You win! But, in my defense, I did not put those there. Regardless, I put
a leading 0 on each .4 and the problem has been fixed.

   Now, ... to get the last glitches from FuzzyOCR and I'll be done with this
problem set.

Many thanks,

Rich

-- 
Richard B. Shepard, Ph.D.               |    The Environmental Permitting
Applied Ecosystem Services, Inc.        |          Accelerator(TM)
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863

Re: Fixing Broken Rules

Posted by Adam Lanier <ad...@krusty.madoff.com>.
On Wed, 2007-01-24 at 11:26 -0800, Rich Shepard wrote:
> 
>    I was looking in the wrong file, it should be 50_scores.cf. And, in that
> file there are:
> 
> score DNS_FROM_AHBL_RHSBL 0 0.306 0 0.231
> score DNS_FROM_RFC_ABUSE 0 0.479 0 0.200
> score DNS_FROM_RFC_BOGUSMX 0 2.034 0 1.945
> score DNS_FROM_RFC_DSN 0 2.872 0 2.597
> score DNS_FROM_RFC_POST 0 1.440 0 1.708
> score DNS_FROM_RFC_WHOIS 0 0.879 0 1.447
> score DNS_FROM_SECURITYSAGE 0 2.001 0 1.513
> 
>    So there are no '.4' scores in that set.
> 
>    Does this help identify the problem?

It helps identify where the problem isn't.

Did you do a grep for 'DNS_FROM_AHBL_RHSBL' (for example)
in /etc/mail/spamassassin?

I'm betting you have a 'score DNS_FROM_AHBL_RHSBL .4' in local.cf or
some other cf file in that directory.

Re: Fixing Broken Rules

Posted by Rich Shepard <rs...@appl-ecosys.com>.
On Wed, 24 Jan 2007, Rich Shepard wrote:

> [22906] warn: config: SpamAssassin failed to parse line,
> "DNS_FROM_AHBL_RHSBL .4" is not valid for "score", skipping: score
> DNS_FROM_AHBL_RHSBL .4
> [22906] warn: config: SpamAssassin failed to parse line, "DNS_FROM_RFC_ABUSE
> .4" is not valid for "score", skipping: score DNS_FROM_RFC_ABUSE .4
> [22906] warn: config: SpamAssassin failed to parse line,
> "DNS_FROM_RFC_BOGUSMX .4" is not valid for "score", skipping: score
> DNS_FROM_RFC_BOGUSMX .4
> [22906] warn: config: SpamAssassin failed to parse line, "DNS_FROM_RFC_DSN
> .4" is not valid for "score", skipping: score DNS_FROM_RFC_DSN .4
> [22906] warn: config: SpamAssassin failed to parse line, "DNS_FROM_RFC_POST
> .4" is not valid for "score", skipping: score DNS_FROM_RFC_POST .4
> [22906] warn: config: SpamAssassin failed to parse line, "DNS_FROM_RFC_WHOIS
> .4" is not valid for "score", skipping: score DNS_FROM_RFC_WHOIS .4

   I was looking in the wrong file, it should be 50_scores.cf. And, in that
file there are:

score DNS_FROM_AHBL_RHSBL 0 0.306 0 0.231
score DNS_FROM_RFC_ABUSE 0 0.479 0 0.200
score DNS_FROM_RFC_BOGUSMX 0 2.034 0 1.945
score DNS_FROM_RFC_DSN 0 2.872 0 2.597
score DNS_FROM_RFC_POST 0 1.440 0 1.708
score DNS_FROM_RFC_WHOIS 0 0.879 0 1.447
score DNS_FROM_SECURITYSAGE 0 2.001 0 1.513

   So there are no '.4' scores in that set.

   Does this help identify the problem?

Thanks,

Rich

-- 
Richard B. Shepard, Ph.D.               |    The Environmental Permitting
Applied Ecosystem Services, Inc.        |          Accelerator(TM)
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863

Re: Fixing Broken Rules

Posted by Rich Shepard <rs...@appl-ecosys.com>.
On Wed, 24 Jan 2007, Theo Van Dinter wrote:

> If you run in debug mode, you'll see all the files that SA is using for
> configs.  At least one of those files will have the invalid config lines. 
> My guess is something in the site-wide config directory
> (/etc/mail/spamassassin).

Theo,

   Here is the result:

[root@salmo /etc/mail/spamassassin]# ./spamassassin -D
[30898] dbg: logger: adding facilities: all
[30898] dbg: logger: logging level is DBG
[30898] dbg: generic: SpamAssassin version 3.1.7
[30898] dbg: config: score set 0 chosen.
[30898] dbg: util: running in taint mode? yes
[30898] dbg: util: taint mode: deleting unsafe environment variables,
resetting PATH
[30898] dbg: util: PATH included '/root/bin', keeping
[30898] dbg: util: PATH included '/usr/java/j2sdk1.4.1_02/bin', which
doesn't exist, dropping
[30898] dbg: util: PATH included '/usr/java/apache-ant-1.5.3-1/bin', which
doesn't exist, dropping
[30898] dbg: util: PATH included '/opt/qt/bin', which doesn't exist,
dropping
[30898] dbg: util: PATH included '/usr/local/sbin', keeping
[30898] dbg: util: PATH included '/usr/sbin', keeping
[30898] dbg: util: PATH included '/sbin', keeping
[30898] dbg: util: PATH included '/usr/local/bin', keeping
[30898] dbg: util: PATH included '/usr/bin', keeping
[30898] dbg: util: PATH included '/bin', keeping
[30898] dbg: util: PATH included '/usr/X11R6/bin', keeping
[30898] dbg: util: PATH included '/usr/games', which doesn't exist, dropping
[30898] dbg: util: PATH included '/opt/www/htdig/bin', keeping
[30898] dbg: util: PATH included '/usr/lib/java/bin', keeping
[30898] dbg: util: PATH included '/usr/lib/java/jre/bin', keeping
[30898] dbg: util: PATH included '/usr/lib/qt/bin', keeping
[30898] dbg: util: PATH included '/usr/share/texmf/bin', keeping
[30898] dbg: util: final PATH set to:
/root/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/opt/www/htdig/bin:/usr/lib/java/bin:/usr/lib/java/jre/bin:/usr/lib/qt/bin:/usr/share/texmf/bin
[30898] dbg: message: ---- MIME PARSER START ----
[30898] dbg: message: main message type: text/plain
[30898] dbg: message: parsing normal part
[30898] dbg: message: added part, type: text/plain
[30898] dbg: message: ---- MIME PARSER END ----
[30898] dbg: dns: is Net::DNS::Resolver available? yes
[30898] dbg: dns: Net::DNS version: 0.59

> BTW, you previously mentioned /etc/mail/spamassassin/rules/ ...  What is this
> directory?  It's not standard.

   I upgraded SpamAssassin-3.1.0 to -3.1.7 using CPAN. That left four files
in /etc/mail/spamassassin/, none of which was an executable. Then I went to
the site's download page and grabbed the tarball. Built and installed from
that. The tarball put the rules/ subdirectory there. In
/usr/share/spamassassin I have 25_dkim.cf, 60_whitelist_dk.cf,
60_whitelist_dkim.cf, and  sa-update-pubkey.txt.

   If directories and files are mis-located, point me to a list of the
correct locations and I'll move them around.

Thanks,

Rich

-- 
Richard B. Shepard, Ph.D.               |    The Environmental Permitting
Applied Ecosystem Services, Inc.        |          Accelerator(TM)
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863

Re: Fixing Broken Rules

Posted by Theo Van Dinter <fe...@apache.org>.
On Wed, Jan 24, 2007 at 08:22:07AM -0800, Rich Shepard wrote:
>    When I look for '.4' in the rules files I cannot find it. Otherwise I
> would have changed it.

If you run in debug mode, you'll see all the files that SA is using for
configs.  At least one of those files will have the invalid config lines.  My
guess is something in the site-wide config directory (/etc/mail/spamassassin).

BTW, you previously mentioned /etc/mail/spamassassin/rules/ ...  What is this
directory?  It's not standard.

-- 
Randomly Selected Tagline:
"The very powerful and the very stupid have one thing in common.
 Instead of altering their views to fit the facts, they alter the facts
 to fit their views ... which can be very uncomfortable if you happen to
 be one of the facts that needs altering." - Doctor Who, "Face of Evil"

Re: Fixing Broken Rules

Posted by Rich Shepard <rs...@appl-ecosys.com>.
On Wed, 24 Jan 2007, Theo Van Dinter wrote:

> ".4" isn't a valid number and so can't be parsed.  Try "0.4".

Theo,

    When I look for '.4' in the rules files I cannot find it. Otherwise I
would have changed it.

Rich

-- 
Richard B. Shepard, Ph.D.               |    The Environmental Permitting
Applied Ecosystem Services, Inc.        |          Accelerator(TM)
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863

Re: Fixing Broken Rules

Posted by Theo Van Dinter <fe...@apache.org>.
On Wed, Jan 24, 2007 at 07:25:38AM -0800, Rich Shepard wrote:
> [22906] warn: config: SpamAssassin failed to parse line,
> "DNS_FROM_AHBL_RHSBL .4" is not valid for "score", skipping: score
> DNS_FROM_AHBL_RHSBL .4

".4" isn't a valid number and so can't be parsed.  Try "0.4".

-- 
Randomly Selected Tagline:
"I hold it, that a little rebellion, now and then, is a good thing..."
                   - Thomas Jefferson