Skip to content

FreeBSD: logrotate install and add file for log rotating

March 24, 2012

..continue from HOWTO: Install and Configure Postfix + DKIM in FreeBSD jail for LARGE SENDING

Assuming we are in plain freebsd jail without logrotate installed

1. Install logrotate

#cd /usr/ports/sysutils/logrotate/
#make install clean clean-depends

2. Make lograte of mail logs ( /var/log/maillog  => 100Mbytes ) , and add to crontab on every 2 hour

# cat /etc/logrotate.d/maillog ; crontab -l
/var/log/maillog {
size 100M
rotate 200
* */2 * * * /usr/local/sbin/logrotate -f /etc/logrotate.d/maillog


From → Quick Tips

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: