Mail Stats bug ISPconfig 3.08 RC1

Discussion in 'Developers' Forum' started by mghens, Jan 9, 2009.

  1. mghens

    mghens New Member

    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 @@
     
  2. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Hi, Its great that you post changes. But please post bugs to the bugtracker and not here. Bugs posted here may not get handled and fixed by the developers.

    http://bugtracker.ispconfig.org

    And please add a description waht the bug was and what you changed.
     
  3. mghens

    mghens New Member

    Ok

    I have them in the bugtracker
     

Share This Page