LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   error: mail command failed for /var/log/squidguard/squidGuard.log.6 (http://www.linuxquestions.org/questions/linux-networking-3/error-mail-command-failed-for-var-log-squidguard-squidguard-log-6-a-281405/)

Niceman2005 01-23-2005 07:29 PM

error: mail command failed for /var/log/squidguard/squidGuard.log.6
 
Dear all,

I have a cron job to rotate my squidguard.log and mail it to my e-mail address. But seems like there is a problem in the mailing procedure. Also I set rotate 5 but the rotation of squigguard reached squidguard.log.6

Below is my configuration for /etc/logrotate.d/squidguard:

/var/log/squidguard/squidGuard.log {
daily
rotate 5
mail bfyong@shinyang.com.my
copytruncate
# compress
# notifempty
missingok
}

And the error message when I did a "# /usr/sbin/logrotate -f -s /var/lib/logrotate.status /etc/logrotate.conf
"
gave me:
error: mail command failed for /var/log/squidguard/squidGuard.log.6

I am not sure why it rotates till squidguard.log.6 because I thought if I set "rotate 5" it should rotate the log files to no5.

Please help me with this,
thanks a lot

diadomraz 01-22-2009 01:24 PM

Logrotate required packages
 
I just stumbled upon a similar problem. It looks like logrotate requires to external packages for the mail and compress commands. These are mailx and ncompress.

Running

yum install mailx ncompress

fixes the problem

Regards
Dobromir Velev


All times are GMT -5. The time now is 10:31 PM.