List Info

Thread: Some rules not loading




Some rules not loading
country flaguser name
United States
2007-08-21 08:37:41
I had a message picked up as spam on our production server
(amavisd-new,
not maia) this morning and came to test the same message
against our
test server we have up with Maia. I cannot find one of the
rules,
CTYPE_001C_A, in the database. I ran load-sa-rules.pl to
find no new
rules. Then, I explicity set the folders in maia.conf and
ran it again,
but still not there, however it did find one new rule after
changing my
updates dir from 'undef'. Where else can I look to find why
this rule,
and perhaps others are not loading? Is my SQL query correct
below to
find the rule?

$local_cf_dir = "/etc/mail/spamassassin";
$system_rules_dir =
"/var/db/spamassassin/%%VERSION%%";  # sa-update

mx1# /etc/periodic/daily/822.webtent-sa-update
2007-08-21 09:21:31 Maia: [load-sa-rules] Adding new rule:
TVD_PDF_FINGER01 (Mail matches standard pdf spam
fingerprint)
2007-08-21 09:22:55 Maia: [load-sa-rules] 1 new rules added
(1463 rules total), all scores updated.

mx1# grep
CTYPE_001C_A
/var/db/spamassassin/3.002001/updates_spamassassin_org/72_ac
tive.cf
##{ CTYPE_001C_A
header CTYPE_001C_A Content-Type =~
/multipart.{0,200}boundary=
"----=_NextPart_000_0001_01C[0-9A-F].[0-9A-F]0
"/
##} CTYPE_001C_A

mx1# /etc/periodic/daily/822.webtent-sa-update
2007-08-21 09:21:31 Maia: [load-sa-rules] Adding new rule:
TVD_PDF_FINGER01 (Mail matches standard pdf spam
fingerprint)
2007-08-21 09:22:55 Maia: [load-sa-rules] 1 new rules added
(1463 rules
total), all scores updated.
No Update:       MSRBL-Images.hdb  Available Tue Aug 21
09:22:57 EDT
2007
No Update:       MSRBL-SPAM.ndb  Available Tue Aug 21
09:22:57 EDT 2007
No Update:       phish.ndb  Available Tue Aug 21 09:22:59
EDT 2007
No Update:       scam.ndb  Available Tue Aug 21 09:22:59 EDT
2007
Stopping amavisd.
Waiting for PIDS: 21214.
Starting amavisd.

maia=> select * from maia_sa_rules where rule_name =
'CTYPE_001C_A';
 id | rule_name | rule_description | rule_score_0 |
rule_score_1 |
rule_score_2 | rule_score_3 | rule_count 
----+-----------+------------------+--------------+---------
-----+--------------+--------------+------------
(0 rows)


-- 
Robert

_______________________________________________
Maia-users mailing list
Maia-usersrenaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users

Re: Some rules not loading
country flaguser name
Canada
2007-08-21 15:32:31
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Fitzpatrick wrote:
> I had a message picked up as spam on our production
server (amavisd-new,
> not maia) this morning and came to test the same
message against our
> test server we have up with Maia. I cannot find one of
the rules,
> CTYPE_001C_A, in the database. I ran load-sa-rules.pl
to find no new
> rules. Then, I explicity set the folders in maia.conf
and ran it again,
> but still not there, however it did find one new rule
after changing my
> updates dir from 'undef'. Where else can I look to find
why this rule,
> and perhaps others are not loading? Is my SQL query
correct below to
> find the rule?

You haven't done anything wrong, and if you look at the
headers of the
mail after Maia gets done with it I'm sure you'll see the
new rule
appear in the X-Spam list, even if it doesn't appear in
Maia's mail viewer.

The problem is that the load-sa-rules.pl script only picks
up rules that
are properly formatted, which means rules that have a
definition and a
"describe" line.  In some cases rule authors get
lazy and forget to
include a "describe" line, whereas in other cases
the omission is
intentional, because the author only intends the rule to be
used in
combination with other rules (i.e. within a META rule). 
Since the
load-sa-rules.pl script can't guess at the rule author's
intention, it
ignores rules without "describe" lines.

Note that this doesn't change the way /SpamAssassin/ sees
the
rules--SpamAssassin will see the new rule and will happily
use it, even
without a "describe" line.  It just won't show up
in Maia's mail viewer
in the list of triggered rules, since Maia doesn't know
about that
particular rule.

If you want to correct the situation, you can add a
"describe" line for
the rule yourself, e.g.

describe CTYPE_001C_A Idiot rule author forgot to describe
his rule

If you then run load-sa-rules.pl again, it should pick up
the rule and
add it to its table of rule descriptions.

- --
Robert LeBlanc <rjlrenaissoft.com>
Renaissoft, Inc.
Maia Mailguard <http://www.maiamail
guard.com/>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFGy0vfGmqOER2NHewRAjSrAJ9zmGC4BDb4hrBQlcqanMGimliBGQCg
iHlJ
n1LOau/eH0nOfnL0X/yUbGE=
=vGeZ
-----END PGP SIGNATURE-----
_______________________________________________
Maia-users mailing list
Maia-usersrenaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )