Spamc by default only accepts mail messages 256KB and less, otherwise it
returns "0/0" when using fast_spamassassin, which in turn can cause any
e-mail bigger than 256kb to be flagged as spam.


You can up the max file size with the -s option in
qmail-scanner-queue.pl in your qmail bin directory.

The line in mine looks like this: my $spamc_options='-c -f -s 4000000';

Here is the patch for sub-spamassassin.pl , you need to apply this
before configure/install or cut and paste it into qmail-scanner-queue.pl



--- ./sub-spamassassin.pl.orig  Mon Oct  7 16:25:43 2002
+++ sub-spamassassin.pl Tue Jan 14 00:23:24 2003
@@ -7,6 +7,7 @@
   my ($start_spamassassin_time)=[gettimeofday];
   my
($DD,$spamassassin_status,$stop_spamassassin_time,$spamassassin_time);
   my ($sa_status)=0;
+  my ($sa_error)=0;
   my ($sa_score)=0; my ($sa_max)=0;
   &debug("SA: run $spamc_binary $spamc_options <
$scandir/$wmaildir/new/$file_id");
   open(SA,"$spamc_binary $spamc_options <
$scandir/$wmaildir/new/$file_id|")||&tempfail("cannot run $spamc_binary
< $scandir/$wmaildir/new/$file_id - $!");
@@ -15,6 +16,7 @@
     if ($spamc_options =~ /\-c/) {
       ($sa_score,$sa_max)=split(/\//,$_,2);
       $sa_max=~s/\n//g;
+      if ($sa_score == "0" && $sa_max == "0") { $sa_error = "1"; }
     }
     #X-Spam-Status: No, hits=2.8 required=5.0
     if (/^X-Spam-Status: (Yes|No), hits=(.*) required=(.*)/) {
@@ -37,7 +39,7 @@
   } else {
     unlink("$scandir/$wmaildir/new/$file_id.spamc");
   }
-  if ($sa_status == 0) {
+  if ($sa_status == 0 && $sa_error != "1") {
     if ($sa_max == 0 && $sa_score != 0) {
       $tag_score .= "SA:?($sa_score/$sa_max):";
     } else {
@@ -51,9 +53,15 @@
       }
     }
   } else {
+    if ($sa_max == "0" && $sa_score == "0") {
+      $tag_score .= "SA:1($sa_score/$sa_max):";
+      $sa_comment = "No, hits=$sa_score required=$sa_max" if
($spamc_options =~ /\-c/);
+      &debug("SA: An error occured.. message too large to scan?");
+    } 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");
+      }
   }
   
   $stop_spamassassin_time=[gettimeofday];



Thanks all!

James Dogopoulos
[EMAIL PROTECTED]
--
Dynamic Internet
http://www.dyni.net
1-877-561-3299



-------------------------------------------------------
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
_______________________________________________
Qmail-scanner-general mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/qmail-scanner-general

Reply via email to