Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Jan 2012 14:14:35 -0800
From:      Garrett Cooper <yanegomi@gmail.com>
To:        "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
Cc:        FreeBSD current mailing list <freebsd-current@freebsd.org>
Subject:   Re: periodic emails
Message-ID:  <CAGH67wSUuzMtS51gOV5POEmuw3Do-Kcg6H3dawpDJ39a=OSw7A@mail.gmail.com>
In-Reply-To: <E4CECE08-C9BE-4CA5-842B-420A44DCF461@lists.zabbadoz.net>
References:  <E4CECE08-C9BE-4CA5-842B-420A44DCF461@lists.zabbadoz.net>

next in thread | previous in thread | raw e-mail | index | archive | help
--f46d044469e7672daa04b592e822
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Mon, Jan 2, 2012 at 1:29 PM, Bjoern A. Zeeb
<bzeeb-lists@lists.zabbadoz.net> wrote:
> Hi,
>
> why do we send all these empty headings for periodic emails or given ther=
e is
> no output to this one can we
>
> 1) suppress the empty sections (to me that sounds a bit like a wrong
> =A0 return code or something maybe?), and
> 2) add an option to suppress "empty" periodic emails entirely?
>
> Sample:
> -------
> Removing stale files from /var/preserve:
>
> Cleaning out old system announcements:
>
> Removing stale files from /var/rwho:
>
> Backup passwd and group files:
>
> Verifying group file syntax:
> /etc/group is fine
>
> Security check:
> =A0 (output mailed separately)
>
> Checking for denied zone transfers (AXFR and IXFR):
>
> -- End of daily output --
> -------
>
>
> I'd also like to get the hostname out of the headings of the security ema=
ils
> if possible. =A0It's in the Subject:. =A0There's no need to have each sec=
tion header
> starting differently. =A0I understand that it would be a POLA problem giv=
en a lot
> of people parse these emails automatically so adding an option for that w=
ould be
> ok with me as well.
>
> Any takers?

    How does this look for starters? The attached patch's goal is to
provide a generic, rc(5)-like infrastructure that would quiet down the
periodic emails for 120.clean-preserve .
Thanks,
-Garrett

--f46d044469e7672daa04b592e822
Content-Type: application/octet-stream; 
	name="quiet-periodic-mail-noise-v01.patch"
Content-Disposition: attachment; 
	filename="quiet-periodic-mail-noise-v01.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_gwy1q7kn1

SW5kZXg6IGV0Yy9wZXJpb2RpYy5zdWJyCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIGV0Yy9wZXJpb2RpYy5zdWJy
CShyZXZpc2lvbiAwKQorKysgZXRjL3BlcmlvZGljLnN1YnIJKHdvcmtpbmcgY29weSkKQEAgLTAs
MCArMSwxMDUgQEAKKyMgJEZyZWVCU0QkCisjCisjIENvcHlyaWdodCAoYykgMTk5Ny0yMDA0IFRo
ZSBGcmVlQlNEIEZvdW5kYXRpb24sIEluYy4KKyMgQWxsIHJpZ2h0cyByZXNlcnZlZC4KKyMKKyMg
UmVkaXN0cmlidXRpb24gYW5kIHVzZSBpbiBzb3VyY2UgYW5kIGJpbmFyeSBmb3Jtcywgd2l0aCBv
ciB3aXRob3V0CisjIG1vZGlmaWNhdGlvbiwgYXJlIHBlcm1pdHRlZCBwcm92aWRlZCB0aGF0IHRo
ZSBmb2xsb3dpbmcgY29uZGl0aW9ucworIyBhcmUgbWV0OgorIyAxLiBSZWRpc3RyaWJ1dGlvbnMg
b2Ygc291cmNlIGNvZGUgbXVzdCByZXRhaW4gdGhlIGFib3ZlIGNvcHlyaWdodAorIyAgICBub3Rp
Y2UsIHRoaXMgbGlzdCBvZiBjb25kaXRpb25zIGFuZCB0aGUgZm9sbG93aW5nIGRpc2NsYWltZXIu
CisjIDIuIFJlZGlzdHJpYnV0aW9ucyBpbiBiaW5hcnkgZm9ybSBtdXN0IHJlcHJvZHVjZSB0aGUg
YWJvdmUgY29weXJpZ2h0CisjICAgIG5vdGljZSwgdGhpcyBsaXN0IG9mIGNvbmRpdGlvbnMgYW5k
IHRoZSBmb2xsb3dpbmcgZGlzY2xhaW1lciBpbiB0aGUKKyMgICAgZG9jdW1lbnRhdGlvbiBhbmQv
b3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JWyAteiAiJHByaW50IiBdICYmIHJjPTAKQEAgLTQ1LDkgKzQ2LDcg
QEAKIAkgICAgZWxzZQogCQlyYz0zCiAJICAgIGZpCi0JZmk7OworCWZpCitmaQogCi0gICAgKikg
IHJjPTA7OwotZXNhYwotCiBleGl0ICRyYwo=
--f46d044469e7672daa04b592e822--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGH67wSUuzMtS51gOV5POEmuw3Do-Kcg6H3dawpDJ39a=OSw7A>