In Centos 5 rotated files were named as maillog.1 maillog.2, etc
Now in Centos 6 I see they are named as maillog-20150104, adding the date they were created
I have a cron job that sends me a weekly report of mail server.
Code:
perl /usr/local/pflogsumm/pflogsumm.pl /var/log/maillog.1 2>&1 |/bin/mailx -s "Last week email report" root
which, obviously sends an error: maillog.1 does not exist.
How can I change that code to analyze the last rotated mail log file?
Thank you