I have tried to implement pflogsumm on my CentOS 5 box. I have followed the how-to exactly. Now what happens is:
1. Where there used to be 4 maillog files in /var/log (maillog, maillog.0, maillog.1, etc) there is only 1 huge maillog file.
2. I get a mailing every day from the cron daemon that says:
error: syslog:1 duplicate log entry for /var/log/messages"
Logwatch is installed and running per the default for CentOS 5 (I didn't install it, it was installed with the OS).
So it seems that logrotate is failing but I cannot find where or why. Here is my logrotate.conf:
[root@mail etc]# more logrotate.conf
# see "man logrotate" for details
# rotate log files weekly
# keep 4 weeks worth of backlogs
# create new (empty) log files after rotating old ones
# uncomment this if you want your log files compressed
# RPM packages drop log rotation information into this directory
# no packages own wtmp -- we'll rotate them here
create 0664 root utmp
# system-specific logs may be also be configured here.
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
I did no mods to the cron job for the logrotate. Here is my /usr/local/sbin/postfix_report.sh:
[root@mail etc]# more /usr/local/sbin/postfix_report.sh
pflogsumm /var/log/maillog.0 | formail -c -I"Subject: Mail Statistics" -I"From: pflogsumm@<mydomain>.net" -I"To:
systems@<mydomain>.net" -I"Received: from mail.<mydomain>.net ([192.168.1.11])" | sendmail systems@<mydomain>.net
The message from the cron seems no help at all but def something I did affected it as I didn't get it until the night I tried to implement pflogsumm...
Any help would be greatly appreciated! I will prvide any other info you might need.
Edited: Removed my real domain before some crawler grabs my email for spam use