Thanks for pointing out the problem with qmail_requeue in my first idea, Dallas. After some fooling around I got this to work. I made the high scoring spam a unique quarantine event and then deleted it after the call to email_quarantine_report. This patch makes sub-spamassassin.pl quarantine spam and patch to qmail-scanner-queque.template adds a var for delete threshold, deletes spam with SA scores N points above normal spam threshold and supresses the report to admin but not sender. The patch is for 1.20 rc4, but the same changes will work in 1.16 or 1.15.
-->Russ --- I love open source! --- patch1 --- qmail-scanner-queue.template Wed Oct 15 15:05:10 2003 +++ qmail-scanner-queue.template Thu Oct 23 21:48:56 2003 @@ -228,6 +228,9 @@ #Descriptive string to use in generated Email my $destring="virus"; +#Delete spam with SA score way above bad +my $nuke_threshold=25; + ##################################################################### ## ## End of site-specific settings @@ -413,6 +416,10 @@ &debug("unsetting TCPREMOTEIP env var"); delete $ENV{'TCPREMOTEIP'}; &email_quarantine_report; + if ($quarantine_event eq "NUKE") { + &debug("nuking: $scandir/$vmaildir/new/$file_id"); + system $rm_binary,"-f","$scandir/$vmaildir/new/$file_id"; + } } else { &qmail_parent_check; &qmail_requeue($env_returnpath,$env_recips,"$scandir/$wmaildir/new/$file_id"); @@ -1336,7 +1343,7 @@ print QTINE "*** Qmail-Scanner Envelope Details End ***\n"; close QTINE; &email_sender("sender") if (&valid_virus_to_report($quarantine_description)); - &email_sender("admin"); + &email_sender("admin") if ($quarantine_event != "NUKE"); if ($trecips =~ /\0T/) { for $recip (split(/\0T/,$trecips)) { &email_recips($recip); patch2 --- sub-spamassassin.pl Sun Sep 28 17:17:22 2003 +++ sub-spamassassin.pl Thu Oct 23 21:50:25 2003 @@ -56,6 +56,12 @@ } else { $tag_score .= "SA:1($sa_score/$sa_max):"; $sa_comment = "Yes, hits=$sa_score required=$sa_max" if ($spamc_options =~ /\-c/); + if ($sa_score >= $sa_max + $nuke_threshold) { + $quarantine_event = "NUKE"; + } else { + $quarantine_event = "SA: SPAM"; + } + $quarantine_description = "Unsolicited Commercial Email (SPAM) REFUSED $sa_score"; &debug("SA: yup, this smells like SPAM"); } $stop_spamassassin_time=[gettimeofday]; ------------------------------------------------------- This SF.net email is sponsored by: The SF.net Donation Program. Do you like what SourceForge.net is doing for the Open Source Community? Make a contribution, and help us add new features and functionality. Click here: http://sourceforge.net/donate/ _______________________________________________ Qmail-scanner-general mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/qmail-scanner-general