[Mimedefang] message detected as SPAM but not rejected

Andrzej Adam Filip anfi at onet.eu
Mon Jun 16 10:43:37 EDT 2008


"C.M. Burns" <montiburns at googlemail.com> wrote:
> i changed the config (section filte_end) of mimedefang to
>
>
>       if ($hits >= 6)
>       {
>           action_bounce("Message detected as SPAM with score $hits.");
>       }
>
> which sometimes works just as it should.
> but not always.
>
> in most cases, mimedefang recognizes an incoming mail as spam
>
> Jun 16 12:12:45 mailserver mimedefang.pl[6312]:
> MDLOG,06D72AC861,mail_in,,,<855legal at retractableawnings.com>,<user at example.com>,SPAM:
> Best of Prada%2C Dior%2C UGG
>
> but does not bounce it.
> the MTA then accepts the mail. for debugging reasons i enabled
> spamassassin spamd after queue with the same config file and it
> detects
>
> Jun 16 12:12:45 mailerver spamd[6867]: spamd: result: Y 6 - 
> BAYES_99,JM_REACTOR_MAILER,RCVD_NUMERIC_HELO
> scantime=0.1,size=2708,user=webmail,uid=500,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=57814,mid=<000501c8cf98$03644327$09653ea0 at dxhlu>,bayes=1.000000,autolearn=no 
>
> with a score of 6, defang should have bounced the mail.
> i can only think of one reason for this: mimedefang has another score
> as SA with the same config file.

* MIMEDefang script offerers $hits as float/real value
* spamd logs $score (it name for $hits) as integer [int($score)]

e.g. with $hits=5.6 spamd logs 6 as "spaminess score" but MIMEDefang
script sees value below 6.

> has someone an idea how to solve this problem?

*MIMEDefang:* 
  convert $hits to integer before comparison:
    if (int($hits) >= 6)
  or use more "rounding friendly" border value:
    if( $hits >= 5.5 )

*spamd:* log "more detailed" value of $score:

  1623 <    my $log = sprintf("spamd: result: %s %2d - %s %s", $yorn, $score,
  1624 <                 $tests, join(",", @extra));
  1623 >    my $log = sprintf("spamd: result: %s %5.2f - %s %s", $yorn, $score,
  1624 >                 $tests, join(",", @extra));

-- 
[pl>en: Andrew] Andrzej Adam Filip : anfi at priv.onet.pl : anfi at xl.wp.pl
"Pull the trigger and you're garbage."
  -- Lady Blue



More information about the MIMEDefang mailing list