On Wed, Aug 18, 2004 at 04:55:28PM -0700, Peter Scott wrote:
> I have a program that, among many other things, does the usual:
>         $mail   = Mail::Audit->new ...
>         $sa     = Mail::SpamAssassin->new ...
>         $status = $sa->check($mail);

Ok, so you have a program which wants to do a check.  FYI: Your code
snippet isn't going to work in SpamAssassin 3.0 since it has no support
for Mail::Audit.  You need to use Mail::SpamAssassin::Message.

> 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 

You can't do that and have the methods available.  For spamc/spamd,
you pass a message in, it gets filtered, you get it back.  If you want
some information from the message on the client side, you'll have to
parse the message headers.

> wondering if I can build a $status object from the output of 
> spamc.  Does this sound reasonable?

Can't do it, sorry.  First, spamc is written in C.  Second, the processing
happens in spamd so even if you had a perl client, you wouldn't have
any objects.

If you want method access to the data, you'll need to figure out some
way of daemonizing the program to keep everything loaded in memory,
ala what spamd does.  If you can't daemonize it, you'll have to figure
out something else.

-- 
Randomly Generated Tagline:
Good pings come in small packets.

Attachment: pgpXU4j9Ky6jU.pgp
Description: PGP signature

Reply via email to