View Single Post
  #1  
Old 9th January 2009, 02:02
mghens mghens is offline
Junior Member
 
Join Date: Jan 2009
Posts: 19
Thanks: 3
Thanked 2 Times in 2 Posts
Default Mail Stats bug ISPconfig 3.08 RC1

in cron_daily.php

Changes I made to get mail stats to work:


--- cron_daily.php 2009-01-08 16:56:23.000000000 -0800
+++ cron_daily.php.orig 2009-01-08 16:55:14.000000000 -0800
@@ -48,13 +48,13 @@
$sql = "SELECT mailuser_id,maildir FROM mail_user WHERE server_id = ".$conf["server_id"];
$records = $app->db->queryAllRecords($sql);
foreach($records as $rec) {
- if(@is_file($rec["maildir"].'/.ispconfig_mailsize')) {
+ if(@is_file($rec["maildir"].'.ispconfig_mailsize')) {

// rename file
- rename($rec["maildir"].'/.ispconfig_mailsize',$rec["maildir"].'/.ispconfig_mailsize_save');
+ rename($rec["maildir"].'.ispconfig_mailsize',$rec["maildir"].'.ispconfig_mailsize_save');

// Read the file
- $lines = file($rec["maildir"].'/.ispconfig_mailsize_save');
+ $lines = file($rec["maildir"].'.ispconfig_mailsize_save');
$mail_traffic = 0;
foreach($lines as $line) {
$mail_traffic += intval($line);
@@ -62,7 +62,7 @@
unset($lines);

// Delete backup file
- if(@is_file($rec["maildir"].'/.ispconfig_mailsize_save')) unlink($rec["maildir"].'/.ispconfig_mailsize_save');
+ if(@is_file($rec["maildir"].'.ispconfig_mailsize_save')) unlink($rec["maildir"].'.ispconfig_mailsize_save');

// Save the traffic stats in the sql database
$tstamp = date("Y-m");
@@ -87,10 +87,11 @@
Reply With Quote
Sponsored Links