Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Mar 2013 03:26:35 +0000 (UTC)
From:      sr@genyosha.net (Steve Rikli)
To:        freebsd-questions@freebsd.org
Subject:   periodic security always sends output mail
Message-ID:  <khguhb$3ha$1@ger.gmane.org>

next in thread | raw e-mail | index | archive | help
I would like to configure periodic on my FreeBSD servers to only send
daily/weekly/monthly/security mails (or logs) when there is something
"important" to report.

I'm close, but periodic security seems to _always_ send mail, even
when there is nothing to report.  My periodic.conf.local has these
pertinent lines (ignore weekly and monthly for now):

    daily_show_success="NO"
    security_show_success="NO"

    daily_show_info="NO"
    security_show_info="NO"

This has the desired effect on daily -- no mail unless something has
happened.  And it _almost_ works for security, but it still sends a
nearly-empty report with only this:

    Security check:

    -- End of daily output --

That behavior is the same whether security is a separate report or
included into daily using daily_status_security_inline="YES".

I think the reason is /etc/periodic/daily/450.status-security sets
"rc=3" after running 'periodic security', and so there's no way to
mask the output.

Is there some other (preferably supported) means of achieving the
goal of no mail or log unless there's something to report?

Thanks,
sr.
-- 
|| Steve Rikli             ||| Well, we've stared at it... that oughta ||
|| Systems Administrator   ||| fix it!  Let's get outta here.          ||
|| Genyosha Networks       |||                                         ||
|| sr@genyosha.net         |||                   - Crow, MST3K         ||




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?khguhb$3ha$1>