Would this work better? I'm already quarantining SA spam with this in sub spamassassin:

  } else {
    $tag_score .= "SA:1($sa_score/$sa_max):";
    $sa_comment = "Yes, hits=$sa_score required=$sa_max" if ($spamc_options =~ /\-c/);
    &debug("SA: yup, this smells like SPAM");
       $quarantine_description="Unsolicited Commercial Email (Spam) REFUSED.";
       $quarantine_event="SA: SPAM";

So how about if I add this to qmail-scanner-queue-template:

  #Now, start the scanners!
  #if (!$quarantine_event) {
    &init_scanners;
  #}
  if ($quarantine_event) {
    &debug("unsetting TCPREMOTEIP env var");
    delete $ENV{'TCPREMOTEIP'};
    &email_quarantine_report;
add-->    if $sa_score > $sa_max+25 {
add-->       rm -f $scandir/quarantine/new/$file_id;
####  I don't know if the path is right or if there is a variable to use
add-->       }
  } else {

I guess I'll try it on my test bed.

ty, -->Russ



> 
>   if ($sa_status == 0) {
>     if ($sa_max == 0) {
>       $tag_score .= "SA:?($sa_score/$sa_max):";
>     } else {
>       $tag_score .= "SA:0($sa_score/$sa_max):";
>       $sa_comment = "No, hits=$sa_score required=$sa_max" if 
> ($spamc_options =~ /\-c/);
>     }
>   } else {
>     $tag_score .= "SA:1($sa_score/$sa_max):";
>     $sa_comment = "Yes, hits=$sa_score required=$sa_max" if 
> ($spamc_options =~ /\-c/);
> 
> add-->    if $sa_score > $sa_max+25 {rm -f 
> add--> $scandir/$wmaildir/new/$file_id}
> 
>     &debug("SA: yup, this smells like SPAM");
>   }
> 
> 

looks to me like it will still try and requeue after returning from
init_scanners().

&qmail_requeue($env_returnpath,$env_recips,"$scandir/$wmaildir/new/$file
_id");

but the qmail_requeue will fail because it does not check for the
existence of $scandir/$wmaildir/new/$file_id.  at least i'm looking at
QS 1.16.  and yet again, i could be wrong.

i would add a couple global vars, 
my $DELETE=0;
my $DELETE_VAL=10;

and then change sub spamassassin to include 

if ($sa_score > $DELETE_VAL) {  
 $DELETE=1
}

then change your qmail_requeue function to 
if (!$DELETE) {
 
&qmail_requeue($env_returnpath,$env_recips,"$scandir/$wmaildir/new/$file
_id");
}

then, QS will clean everything up properly.

d



-------------------------------------------------------
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

Reply via email to