[Mimedefang] Adding bayes_score from Mail::SpamAssassin:EvalTests

Brett Simpson simpsonb at hillsboroughcounty.org
Tue Dec 16 14:59:44 EST 2003


On Tuesday 16 December 2003 01:18 pm, Kelson Vibber wrote:
> At 10:00 AM 12/16/2003, Kelson Vibber wrote:
> >A simple test would be something like
> >($bayes_score) = ($names =~ /\bBAYES_([0-9][0-9])\b/);
>
> Erg - forgot to account for the case where no Bayes rules are triggered.
>
> if ($names =~ /\bBAYES_([0-9][0-9])\b/) {
>          $bayes_score = $1;
>          # Do stuff with the result;
> }

I was looking to do something like add an add_recipient section to the Spam 
filter. This way anything that gets a low bayes score (under BAYES_99) will 
get sent to me. Here's what I did but I get an error.

	        if ($names ne /BAYES_99/) {
                $bayes_score = $1;
                # Do stuff with the result;
                action_change_header("Subject", "$Subject $bayes_score ___");
                add_recipient('webadmin at hillsboroughcounty.org');
                md_graphdefang_log('$bayes_score');
                }

Here's the error.

Dec 16 14:51:59 slim mimedefang-multiplexor: Slave 0 stderr: Use of 
uninitialized value in pattern match (m//) at /etc/mail/mimedefang-filter 
line 378.



More information about the MIMEDefang mailing list