Topic: Hotfix for iRedMail-0.8.4: Incorrect logrotate config file of iRedAPD
Issue description
There's an typo error in logrotate config file of iRedAPD (/etc/logrotate.d/iredapd) on all Linux distributions supported by iRedMail, it causes program "logrotate" cannot rotate iRedAPD log file (/var/log/iredapd.log) at all. The potential risk is that the log file may takes too much disk space if it grows quickly.
Impacted iRedMail versions
Version iRedMail-0.8.4, downloaded before Apr 6, 2013.
Notes:
You can see a timestamp in file /etc/logrotate.d/iredapd, that shows when you installed iRedMail. e.g. "File generated by iRedMail (2013.04.03.11.40.51)" (format is YEAR.MONTH.DAY.HOUR.MINUTE.SECOND).
We re-packed iRedMail-0.8.4 on Apr 6, 2013, so there's no need to fix it if you downloaded iRedMail-0.8.4 after that day, which means you can safely ignore this hotfix.
You don't need this hotfix if your server was upgraded from an old release. e.g. 0.8.3.
Impacted Linux/BSD distributions
It impacts all LINUX distributions supported by iRedMail, but not BSD distributions since they use different logrotate config file.
How to fix it
Please fix it manually by following below steps:
Open /etc/logrotate.d/iredapd with your favorite text editor (e.g. vi, vim, emacs), find below line:
/var/log/iredapd.log
Append a whitespace and a '{':
/var/log/iredapd.log {
You can now verify this config file with command "logrotate" like below, it will print debug message on terminal.
# logrotate -d /etc/logrotate.d/iredapd
That's all.
Credit
All credit goes to our forum user bantopalmarino, thanks for the report here: http://www.iredmail.org/forum/post21327.html#p21327
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.