[Mimedefang] Question about spam/quarantine config

Peter Osterberg Peter_Osterberg at home.se
Wed Sep 24 05:49:01 EDT 2003


Hello,

I thought I was ready for some experiments after using mimedefanger for 
about a week, also with spamassasin installed.

I want to allow spam to reach the client if they score between 5-10 points 
and to be completely removed if they score above 10 points. For now I just 
want to quarantine them just to see if it works.
I started with the default mimedefanger script and just added a few lines 
which I thought would be enough. The problem is somewhat inconsistent in 
that matter that some high scoring mails do get quarantined and some don't. 
I can't see why some mail slip by the first if-statement in the code 
included below. Can anyone see why or suggest a better why to achieve this.

             if ($hits >= 10) {
                 md_graphdefang_log('spam-deleted', $hits, $RelayAdd);

                 action_quarantine_entire_message('Quarantined as spam');
             } else {
                 if (($hits >= $req)  and ($hits < 10)) {
                     md_graphdefang_log('spam', $hits, $RelayAddr);

                     # If you find the SA report useful, add it, I guess...
                     action_add_part($entity, "text/plain", "-suggest",
                                     "$report\n",
                                     "SpamAssassinReport.txt", "inline");
                 } else {
                    # Delete any existing X-Spam-Score header?
                     action_delete_header("X-Spam-Score");
                 }
             }


Sincerely
Peter Osterberg





More information about the MIMEDefang mailing list