Lars Michael Jogback said: > I'm having trouble understanding how I should use the > methods compile_now() and init(). > > Right now I use something like this. > > my $mail = Mail::SpamAssassin::NoMailAudit->new(); > > my $spamtest = Mail::SpamAssassin->new(); > > $spamtest->compile_now(1); > > my $status = $spamtest->check ($mail); > > if ($status->is_spam ()) { > $status->rewrite_mail (); > $mail->accept("spamfolder"); > > } else { > $mail->accept(); # to default incoming mailbox > } > > Is this correct? Or should I use init() instead of compile_now()?
looks fine. If in doubt, cut and paste from spamassassin.raw or spamd.raw ;) --j. ------------------------------------------------------- This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd522.html _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk