Broken logs on Ubuntu 6.06 (perfect setup)

Discussion in 'Installation/Configuration' started by make-fun, Mar 18, 2008.

  1. make-fun

    make-fun Member

    Hi folks,

    a while ago I've noticed that I had gaps in my logfiles from 23:59 to about 06:25 — for the mail logs that is.
    I've narrowed it down to the region of ISPConfig log handling and the syslog rotation

    Code:
    Mar 16 23:59:03 xxxx postfix/master[19713]: terminating on signal 15
    Mar 17 06:27:21 xxxx postfix/cleanup[26969]:
    seems like
    23:59:03 being ISPConfig cron
    06:27:21 being syslogd 1.4.1
    I find that pretty bad in general, not having proper logs for the entire day and in this case they be need for processing, too.
    Then I thought it's but ISPConfig makes up for with the
    Code:
    mail.log.ispconfigsave and mail.log.17-03-08_23-59-02
    files, but no same behavior there…

    Any advice

    Thanks
     
    Last edited: Mar 20, 2008
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Have you tried to activate the sfe log checkbox in the ispconfig server sttings?
     
  3. make-fun

    make-fun Member

    Yes Till, the option is turned on — and yet I'm not quite sure what's it supposed to do…
     
  4. make-fun

    make-fun Member

    Short update…

    By now I'm sure it has to do whith the ISPConfig rotation
    Code:
    59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/mail_logs.php &> /dev/null
    
    as that is exactly the time my mail.log gets broken.

    Can anyone tell me what it's need for and whether it's okay to kick it?
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    If you remove this, the traffic accounting in ISPConfig gets disabled.
     
  6. make-fun

    make-fun Member

  7. wpwood3

    wpwood3 New Member

    I see this issue is still in the bugtracker but it's not assigned to anyone and no action has been taken. Any idea when this might be addressed?
     
  8. falko

    falko Super Moderator ISPConfig Developer

    No decision has been made yet. But I think we'll address this soon.
     
  9. bluethunder82

    bluethunder82 Member

    Hi make-fun,
    I had the same problem. Well it is just the way Ubuntu rotates the mail logs.

    What happens is that the syslog is rotating the mail logs based on the cron.weekly script.

    The simpliest fix is to make a quick change to the file:

    Code:
    /etc/cron.weekly/sysklogd
    By default when you run syslogd-listfiles the mail files are included however there is an exclude command '-s'.

    Change the line:

    Code:
    for LOG in `syslogd-listfiles --weekly --ignore-size`
    to

    Code:
    for LOG in `syslogd-listfiles --weekly -s "mail.*" --ignore-size`
    
    It is important to include the quotation marks around mail.* otherwise the flag will produce an error.

    I also have an extra cron job that copies the mail.* log files in addition to the ispconfig rotate. If you only want the mail.log file to be taken care of by ispconfig's script just use the flag (-s mail.log).

    I hope this helps.

    Cheers.
     

Share This Page