Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • I ISPConfig 3
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 552
    • Issues 552
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 45
    • Merge requests 45
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ISPConfig
  • ISPConfig 3
  • Issues
  • #2543
Closed
Open
Created Mar 25, 2013 by Drew Clardy@dclardy

Mail Error shows blank

While the mail error file is correctly black, it would be nice to include a statement for the user to see that no errors have been found.

I have a corrected the file to allow this to happen.

File: /usr/local/ispconfig/server/lib/classes/monitor_tools.inc.php

Original:

public function monitorMailErrLog() { global $conf;

            /* the id of the server as int */
            $server_id = intval($conf['server_id']);

            /** The type of the data */
            $type = 'log_mail_err';

            /* Get the data of the log */
            $data = 'No mail errors found.';
           
            /*
             * actually this info has no state.
             * maybe someone knows better...???...
             */
            $state = 'no_state';

            /*
             * Return the Result
             */
            $res['server_id'] = $server_id;
            $res['type'] = $type;
            $res['data'] = $data;
            $res['state'] = $state;
            return $res;
    }

Corrected:

public function monitorMailErrLog() { global $conf;

            /* the id of the server as int */
            $server_id = intval($conf['server_id']);

            /** The type of the data */
            $type = 'log_mail_err';

            /* Get the data of the log */
            if ( $this->_getLogData($type) == ''){
                    $data = 'No mail errors found.';
            } else {
                    $data = $this->_getLogData($type);
            };

            /*
             * actually this info has no state.
             * maybe someone knows better...???...
             */
            $state = 'no_state';

            /*
             * Return the Result
             */
            $res['server_id'] = $server_id;
            $res['type'] = $type;
            $res['data'] = $data;
            $res['state'] = $state;
            return $res;
    }

I know this seems like a trivial fix, but I do think that it is an improvement over the current blank or empty file.

Thanks.

Assignee
Assign to
Time tracking