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
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?
Thanks Till, I figured I would not need it as I don't have to care for the mail stats and have turned off the "mail statistics function" already. So it'll be safe to kick it, cool… Maybe you wanna have a look here — same problem, but a very wild solution to it, what do you reckon? http://www.howtoforge.com/forums/showthread.php?t=13731&page=3&highlight=mail_logs.php#28 Cheers
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?
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.