[Draft] sub my_spam_assassin_check (;$) { my($status) = spam_assassin_status(@_); return undef if (!defined($status)); my $hits = $status->get_hits; my $req = $status->get_required_hits(); my $tests = $status->get_names_of_tests_hit(); my $report = $status->get_report(); my $autolearn = ""; #Check if Bayesian is Turned On, If AutoTesting is Turned On, or if AutoLearning is turned off #I believe $SASpamTester will have this info and will be in scope if called from filter_end. if (($SASpamTester->{conf}->{bayes_auto_learn}) and ($SASpamTester->{conf}->{use_bayes}) and (!$SASpamTester->{disable_auto_learning})) { if (!defined($status->{auto_learn_status})) { $autolearn="no"; } elsif ($spamstatus->{auto_learn_status}) { $autolearn="spam"; } else { $autolearn = "ham"; } } $status->finish(); return ($hits, $req, $tests, $report, $autolearn); }