Undefined index: admin_mail

Discussion in 'ISPConfig 3 Priority Support' started by stevenlib, Sep 25, 2013.

  1. stevenlib

    stevenlib New Member

    Hi,

    I get this in the logs and user mailbox traffic is not recorded (all at 0), any relationships? I tied to locate where to enter admin e-mail but could not find any field for it.


    Wed Sep 25 00:30:14 EDT 2013 PHP Notice: Undefined index: admin_mail in /usr/local/ispconfig/server/lib/app.inc.php on line 159

    Here is what starts at line 159:

    if($priority >= $conf['admin_notify_priority'] && $conf['admin_mail'] != '') {
    // send notification to admin
    $mailBody = $log_msg;
    $mailSubject = substr($log_msg,0,50).'...';
    $mailHeaders = "MIME-Version: 1.0" . "\n";
    $mailHeaders .= "Content-type: text/plain; charset=utf-8" . "\n";
    $mailHeaders .= "Content-Transfer-Encoding: 8bit" . "\n";
    $mailHeaders .= "From: ". $conf['admin_mail'] . "\n";
    $mailHeaders .= "Reply-To: ". $conf['admin_mail'] . "\n";

    mail($conf['admin_mail'], $mailSubject, $mailBody, $mailHeaders);
    }
    } // func



    Regards,
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats not related.

    In ispconfig: System > Interface config
     
  3. stevenlib

    stevenlib New Member

    Again

    Hi,

    Even with a specified admin e-mail I get the error mesage in the log:

    Thu Sep 26 00:30:10 EDT 2013 PHP Notice: Undefined index: admin_notify_priority in /usr/local/ispconfig/server/lib/app.inc.php on line 159
    Thu Sep 26 00:30:10 EDT 2013 PHP Notice: Undefined index: admin_mail in /usr/local/ispconfig/server/lib/app.inc.php on line 159

    Regards,
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats a bug in the current release, it is already fixed in svn and the fix will be released as part of the 3.0.5.4 version.
     
  5. stevenlib

    stevenlib New Member

    How do i activate mailbox traffic statistics?

    Regards
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Mailbox traffic statistics are always active.
     
  7. stevenlib

    stevenlib New Member

    Ok, but I get 0 on all mailboxes, how can I get the info?

    Regards,
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Do you use courier or dovecot?
     
  9. stevenlib

    stevenlib New Member

    Hi,

    Its dovecot.

    ++
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, for dovecote, the mail log file is parsed as dovecot is not able to write traffic stats to a file like courier.

    Which Linux distribution do you use and which ispconfig version is installed on your server?
     
  11. stevenlib

    stevenlib New Member

    Hi,

    I use Wheezy (gave up trying to have it running on Centos) and run lastest ISPConfig. Should I then turn off dovecot and run courier instead?

    Regards,
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    No. It should work on wheezy with dovecot out of the box.

    - Do you have curent lines in the /var/log/mail.log file?
    - Is this a fresh setup or did you migrate mailboxes from a courier setup?
     
  13. stevenlib

    stevenlib New Member

    Yes I have dovecot entries in mail.log.
    Fresh setup.

    Regards,
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the output of:

    crontab -l
     
  15. stevenlib

    stevenlib New Member

    Here it is:

    root@helium:~$ crontab -l
    * * * * * /usr/local/ispconfig/server/server.sh 2>&1 > /dev/null | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done
    30 00 * * * /usr/local/ispconfig/server/cron_daily.sh 2>&1 > /dev/null | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    The crontab is ok.

    The mail size is in postfix entries, not dovecot entries. Do you have only dovecot entries or also postfix entries in your log?
     
  17. stevenlib

    stevenlib New Member

    Well on Wheezy looks like the mail logs are split accros many files, this is from my rsyslog.conf file:

    #
    # First some standard log files. Log by facility.
    #
    auth,authpriv.* /var/log/auth.log
    *.*;auth,authpriv.none -/var/log/syslog
    #cron.* /var/log/cron.log
    daemon.* -/var/log/daemon.log
    kern.* -/var/log/kern.log
    lpr.* -/var/log/lpr.log
    mail.* -/var/log/mail.log
    user.* -/var/log/user.log

    #
    # Logging for the mail system. Split it up so that
    # it is easy to write scripts to parse these files.
    #
    mail.info -/var/log/mail.info
    mail.warn -/var/log/mail.warn
    mail.err /var/log/mail.err
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    All relevant info is in the file /var/log/mail.log. The splitted files are additional files which contain parts of the logging infor from mail.log, so the are not relevant for this task. I use Debian Wheezy here too with dovecot (perfect setup guide) and iSPConfig 3.0.5.3 and traffic mail stats as well as mail quota stats are working, so ther is no problem with debian or ispconfig in general, it must be a issue specific to your server or setup.
     
  19. stevenlib

    stevenlib New Member

    Hum... its a fresh install. So the ISPConfig script reads the mail.log file for bandwidth info, is that how it works ?

    Regards,
     

Share This Page