[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#473735: marked as done (After upgrade to Etch amavis-stats stop working)



Your message dated 
with message-id <20100920214919.28465.63934.mass-bugs-close@merkel.debian.org>
and subject line amavis-stats removed from Debian unstable
has caused the Debian Bug report #473735,
regarding After upgrade to Etch amavis-stats stop working
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
473735: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=473735
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: amavis-stats
Version: 0.1.12-7.3
Severity: important
Tags: patch

--- amavis-stats	2006-12-04 08:24:33.000000000 +0100
+++ amavis-stats.new	2008-04-01 11:27:34.000000000 +0200
@@ -508,16 +508,16 @@
     # If this line contains a SPAM tag of some sort don't classify it
     # now, but record the fact and move on to the next line
     #
-    if ($line =~ /\sSPAM(-TAG)*,\s/) {
-        dbg("SPAM: $epoch: $isodate $sid");
-        $spamsess{$sid} = 1;
-        return;
-    }
+#    if ($line =~ /\sSPAM(-TAG)*,\s/) {
+#        dbg("SPAM: $epoch: $isodate $sid");
+#        $spamsess{$sid} = 1;
+#        return;
+#    }
 
     #
     # Save the stats according to the classification of the email
     #
-    if ($line =~ /Passed/) {
+    if ($line =~ /Passed CLEAN/) {
 
         #
         # Update the overall passed emails statistics
@@ -532,7 +532,8 @@
         }
         upCount($id, $epoch);
 
-    } elsif ($line =~ /\sNot-Delivered,\s/) {
+    #} elsif ($line =~ /\sSPAM,\s/) {
+    } elsif ($line =~ /Blocked SPAM/) {
 
         #
         # Update the overall not delivered statistics

--- amavis-stats.php	2006-12-04 08:24:33.000000000 +0100
+++ amavis-stats.php.new	2008-04-01 11:26:33.000000000 +0200
@@ -85,6 +85,8 @@
 
         $cmd = "rrdtool graph $img '". implode("' \\\n'",$opts) . "'" .
                " 2>&1";
+
+               
         asDbg($cmd, 1);
         $out = exec($cmd, $output, $rrd_error_val);
 
@@ -145,10 +147,13 @@
 
 } else { // Stand-alone command line usage
     $cmd = true;
-    $outdir = $_SERVER["PWD"];
+    $outdir = "img";
 
 }
 
+
+
+
 if (isset($GLOBALS["rate"])) {
     $rate = $GLOBALS["rate"];
 } else {
@@ -159,6 +164,7 @@
 if (isset($fullpage) || isset($cmd)) {
     asHtmlStart();
 
+    
     if (asLoadStats()) {
     
         $minsec  = 60;
@@ -312,6 +318,7 @@
 
         $virus[$fields[0]]["id"] = $fields[0];
         $virus[$fields[0]]["name"] = $fields[1];
+        
         if ($fields[1] == "Passed") {
             $pid = $fields[0];
         }
@@ -345,20 +352,28 @@
         $virus[$fields[0]]["lastseen"] = $fields[2];
     }
 
+    
+
     $readfile = @file($as_statefile);
     if (!is_array($readfile)) {
         asErr("Couldn't open state file.");
     }
+    
+    
     asDbg("$as_statefile");
     asDbg($readfile);
 
     for ($k = 0; $k <= (count($readfile) - 1); $k++) {
-        $fields = preg_split("/\s+/",$readfile[$k], -1, PREG_SPLIT_NO_EMPTY);
-        if ($fields[0] == "lastupdate:" && is_numeric($fields[1])) {
-            $lastupdate = $fields[1]; 
+
+        $fields = split("\ ",$readfile[$k],6);
+ 
+        if ($fields[0] == "lastupdate:" && is_numeric(trim($fields[1]))) {
+            $lastupdate = trim($fields[1]);
         } elseif ($fields[0] == "LC_TIME:") {
             setlocale(LC_TIME, $fields[1]);
         }
+      
+      
     }
 
     if (!isset($lastupdate)) {
@@ -499,7 +514,7 @@
         $opts[] = "PRINT:gvt$id:AVERAGE:%.0lf";
     }
 
-    $ret = rrd_graph($img, $opts, count($opts));
+    $ret = rrd_graph("/usr/share/amavis-stats/$img", $opts, count($opts));
 
     /*
     * debugging - graph definitions
@@ -645,7 +660,7 @@
 
     $opts[] = "COMMENT:\\n"; 
     $opts[] = "COMMENT:amavis-stats v$asVersion ";
-    $opts[] = "COMMENT:$enddate \\r";
+    $opts[] = "COMMENT:".str_replace(":", "\:", $enddate)."\\r";
 
     asDbg($opts);
     $ret = rrd_graph("/usr/share/amavis-stats/$img" , $opts, count($opts));
@@ -769,7 +784,7 @@
     }
 */
     $opts[] = "COMMENT:amavis-stats v$asVersion ";
-    $opts[] = "COMMENT:$enddate" . str_replace(":", "\:", $enddate) . " \\r";
+    $opts[] = "COMMENT:". str_replace(":", "\:", $enddate) . " \\r";
 
     /*
     * debugging - graph definitions





-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.21.1
Locale: LANG=cs_CZ.ISO8859-2, LC_CTYPE=cs_CZ.ISO8859-2 (charmap=ISO-8859-2)

Versions of packages amavis-stats depends on:
ii  adduser                      3.102       Add and remove users and groups
ii  debconf [debconf-2.0]        1.5.11etch1 Debian configuration management sy
ii  librrds-perl                 1.2.15-0.3  Time-series data storage and displ
ii  rrdtool                      1.2.15-0.3  Time-series data storage and displ
ii  wwwconfig-common             0.0.48      Debian web auto configuration

Versions of packages amavis-stats recommends:
pn  amavis                        <none>     (no description available)

-- debconf-show failed



--- End Message ---
--- Begin Message ---
Version: 0.1.22+dfsg-2+rm

amavis-stats has been removed from Debian unstable: http://bugs.debian.org/596609

Closing its bugs with a Version higher than the last unstable upload.

More information about this script at:
  http://git.debian.org/?p=users/morph/mass-bugs-close.git;a=blob_plain;f=README;hb=HEAD


--- End Message ---

Reply to: