Summary: | Periodic configuration prints unneeded header when show_sucess="no" | ||
---|---|---|---|
Product: | Base System | Reporter: | frank |
Component: | conf | Assignee: | Jeremie Le Hen <jlh> |
Status: | New --- | ||
Severity: | Affects Some People | CC: | allcoms, jlh |
Priority: | --- | ||
Version: | 9.3-RELEASE | ||
Hardware: | i386 | ||
OS: | Any |
Description
frank
2015-02-16 12:41:54 UTC
Hi Frank, This is not straightforward to do so because as you can see on the URL below this message is printed before calling periodic(8) again for security: https://svnweb.freebsd.org/base/head/etc/periodic/daily/450.status-security?view=markup So there are two solutions: 1. remove this message altogether; this is problematic if the security output is inlined 2. print only this message if there is any output from periodic security; but this requires to bufferize the whole output and then print the caption only if the output is not empty I would favor 2 but it's a bit hackish and heavyweight for the purpose. Let this bug bake a bit to see if others have some input. Whilst I have briefly tried FreeBSD and PCBSD / TrueOS a few times in the past, I am currently setting up my first serious FreeBSD server and this is the first issue I have been unable to resolve with serious searching and experimentation. Like the OP, I would like to utilise periodic and have it run daily but I don't want daily mails being sent, or more specifically I don't want any mails being sent if there are no errors or warnings from any of periodics checks. In my case I configured periodic.conf like so: -------------------------- daily_show_success="NO" daily_show_info="NO" daily_show_badconfig="NO" weekly_show_success="NO" weekly_show_info="NO" weekly_show_badconfig="NO" monthly_show_success="NO" monthly_show_info="NO" monthly_show_badconfig="NO" # Include security jobs with daily email. No need to send second email. daily_status_security_inline="YES" security_show_success="NO" # Don't need to know about denied packets every day daily_status_security_ipfdenied_enable="NO" -------------------------- Which, on a 'good' day, will output an email with a body containing: -------------------------- Security check: hostname kernel log messages: -- End of security output -- -- End of daily output -- -------------------------- That is effectively empty and so ideally, I shouldn't receive a mail at all if that's all it contains. I know I can redirect periodic's output into log files but I'd never read them and because periodic doesn't know when not to send an email (esp. for daily checks) I currently have no other option than to disable it entirely until this gets fixed, do I? I am running FreeBSD 11.0 amd64 |