Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Jun 2007 14:31:48 +0200
From:      Jonathan McKeown <jonathan@hst.org.za>
To:        freebsd-questions@freebsd.org
Cc:        mats.lindberg@se.transport.bombardier.com
Subject:   Re: purging old mail
Message-ID:  <200706011431.48560.jonathan@hst.org.za>
In-Reply-To: <46600D05.2070709@ibctech.ca>
References:  <OF78AB1FA2.BF39D79A-ONC12572ED.0029E012-C12572ED.002AA959@UK.BOMBARDIER.TRANSPORT.COM> <46600D05.2070709@ibctech.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 01 June 2007 14:11, Steve Bertrand wrote:
> mats.lindberg@se.transport.bombardier.com wrote:
> > Hi all,
> > I'm setting up a FreeBSD 5.4 system that need to run unattended for a
> > year or more.
> > I've noticed that the /var/mail/root file grows a bit over time.
> >
> > Do I need to configure the system in some way to prevent this file from
> > growing indefinately, filling up the /var partition?
>
> Are you actually interested in reading root mail?
>
> Are you running sendmail?
>
> If so, in the /etc/mail/aliases file, change the root alias to an email
> address that someone actually POP's.
>
> If you don't want to read the email at all, change the root alias to
> point to /dev/null.

What I've been caught by a couple of times is the periodic(8) routines, which 
quickly fill roots mailbox with daily, weekly and monthly status reports.

If you're not going to forward these to a real user but still want to keep 
(some of) them available, put

daily_output="/var/log/daily.log"
weekly_output="/var/log/weekly.log"
monthly_output="/var/log/monthly.log"

in /etc/periodic.conf. The relevant reports will be logged into the respective 
files, and newsyslog already knows to rotate these if they exist, so they 
won't grow endlessly (by default, /etc/newsyslog.conf keeps a week of dailys, 
5 weeks of weeklys and a year of monthlys).

Jonathan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200706011431.48560.jonathan>