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

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.


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

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


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

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


05 01 * * * root /program/xmail/bin/

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.


Powered by Invision Power Board (
© Invision Power Services (