At 04:35 PM 8/18/2004, Theo Van Dinter wrote:
On Wed, Aug 18, 2004 at 01:13:04PM -0700, Peter Scott wrote:
> to all the PerMsgStatus post-check methods afterwards.  (It would be
> even better if I could just flick a switch in the program so that the
> check() method would flip between using spamc and loading up all the
> modules, but I don't need to go that far now.)

What do you mean "spamc and loading up all the modules"?  spamc doesn't
do anything with modules.

What exactly are you trying to do?

I have a program that, among many other things, does the usual:

        $mail   = Mail::Audit->new ...
        $sa     = Mail::SpamAssassin->new ...
        $status = $sa->check($mail);

and then calls methods on $status like is_spam(), get_hits(), etc. I want this program to use spamc/spamd so it runs faster. But I still want to have an object I can call is_spam() and friends on, including methods like get_names_of_tests_hit().

As far as I can tell at the moment, I have to take the raw mail message, run it through spamc, capture the output, create a Mail::Audit or similar object from it, and then inspect the headers by hand for what spamd did, to find out how many hits there were, etc. I'm wondering if I can build a $status object from the output of spamc. Does this sound reasonable?




Reply via email to