Printable Version of Topic
Click here to view this topic in its original format
XMail Forum > Documentation and Knowledge Base > Log Files


Posted by: Don Mar 13 2008, 07:19 AM
Hi,

Is there a way to limit the number of log files? For example limit the # of each log file (pop3, psync, etc) to 7 days.

Thanks
Don

Posted by: MaartenJB Mar 13 2008, 12:33 PM
Hi Don,

This is pretty easy. Create a bash script with the following line:

CODE

find /program/xmail/logs -mtime +7 -exec rm -rf '{}' \;


and add the bash script to your /etc/crontab, example to add:

CODE

05 01 * * * root /program/xmail/bin/rm_old_log_files.sh


Ofcourse you need to ajust the path to your needs.

Posted by: Don Mar 18 2008, 05:41 AM
Thanks, I'll give it a try.

Don

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)