Hi folks,

Apologies if this seems obvious to you but I have been trying to get
it to work for a couple of hours without luck.

I am trying to programmatically get at the scores (and later,
descriptions) for the rules configured in my install of
SpamAssassin, including scores modified by user_prefs and tests added with
local.cf.

The obvious from reading the docs would seem to be:

use Mail::SpamAssassin;
use Data::Dumper;

my $sa = new Mail::SpamAssassin;
print Dumper($sa->{conf}->{scoreset});

The first wrinkle is that on this particular machine for reasons
I'll not go into, I have had to install this copy of SpamAssassin
(v2.55) under my own home directory.  so:

use lib "/home/user/andy/spamassassin/lib/site_perl/5.6.1";

first, right?

This produces the following output:

$VAR1 = [
          {},
          {},
          {},
          {}
        ];

Odd.

So anyway, I try calling $sa->compile_now before the print, and now I get a big
list of rules like I was expecting.  But then I notice that rules I have added
in local.cf and scores I have changed in user_prefs are not reflected here.

I'd be most grateful if someone could point out what I have missed here.

Thanks,
Andy


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to