daily/weekly/monthly periodic output

Greg Larkin glarkin at FreeBSD.org
Thu Oct 9 15:21:43 UTC 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Corey Dulecki wrote:
> I have FreeBSD 6.2 running on IBM hardware, single CPU.  This server
> does not have sendmail enabled at all, i.e., in /etc/rc.conf, all four
> of the "sendmail_xxx" enablers are set to "NO".  Today, the /var
> filesystem ran out of inodes.
> 
> I tracked the issue down to files that keep appearing in
> /var/spool/clientmqueue.  I've researched enough to understand that
> these files represent emails that cannot be sent, presumably because I
> do not have a mail server running on the system.  I do not want to
> enable sendmail or any other client; what I want to do is have the
> processes which generate these emails send their information to a log,
> which I will check manually.  I believe these emails are being generated
> by the daily/weekly/monthly periodic processes, something that I didn't
> even know existed until I ran out of inodes.
> 
> My question is this:  How can I make it so that these periodic processes
> simply log their messages instead of sending emails that get stuck in
> clientmqueue?  Alternatively, if I can't do that, how do I simply turn
> off these emails entirely so that they are not sent?

Hi Corey,

If you don't already have an /etc/periodic.conf file, create one with
the following entries:

daily_output="/var/log/daily.log"                       # user or /file
daily_status_security_output="/var/log/daily.log"       # user or /file
weekly_output="/var/log/weekly.log"                     # user or /file
monthly_output="/var/log/monthly.log"                   # user or /file

All of the output from the periodic scripts will be redirected to those
files.  You'll likely want to rotate those files regularly.  I have the
following in my /etc/newsyslog.conf file:

/var/log/daily.log                      640  7     *    @T00  JN
/var/log/monthly.log                    640  12    *    $M1D0 JN
/var/log/weekly.log                     640  5     1    $W6D0 JN

Regards,
Greg
- --
Greg Larkin

http://www.FreeBSD.org/       - The Power To Serve
http://www.sourcehosting.net/ - Ready. Set. Code.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFI7iGE0sRouByUApARAlgaAKCnyDbq5X4of+7s6MNgt0HI2GWqZQCgxBW/
aL8nyZHG/qc7CAt+QCs6bH4=
=FvE1
-----END PGP SIGNATURE-----



More information about the freebsd-questions mailing list