Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #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
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPConfig 3.0.0.8 RC1 released till General 92 22nd February 2010 09:52
procmail can't write Hellbound General 27 8th June 2009 21:51
Postfix & mail forwarding loop varnik Server Operation 21 9th December 2008 15:13
Filtering emails using Spamassassin and Clamav for Exchange 2000 Server Rocky Server Operation 19 11th March 2008 08:27
postfix-tls sasl2 mysql courier-authmysql gabrix Server Operation 4 12th January 2007 22:09


All times are GMT +2. The time now is 06:35.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.