Bug 711695

Summary: certwatch cron job usurps crond mail control
Product: [Fedora] Fedora Reporter: JW <ohtmvyyn>
Component: crypto-utilsAssignee: Joe Orton <jorton>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: emaldona, jorton
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-13 23:24:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description JW 2011-06-08 08:22:18 UTC
Description of problem:


Version-Release number of selected component (if applicable):
crypto-utils-2.4.1-27

How reproducible:
Always

Steps to Reproduce:
1. grep sendmail /etc/cron.daily/certwatch
  
Actual results:
1./usr/bin/certwatch ... "$n" | /usr/sbin/sendmail  -oem -oi -t 2>/dev/null

Expected results:
1. /usr/bin/certwatch ... "$n"

Additional info:
crond, which runs jobs like certwatch, has a long-standing and well understood way of dealing with errors.  Any command that outputs an error on stderr gets it sent by mail to root (or whatever).  crond even has a MAILTO option to fine tune this.

It has long been standard practice to deal with errors this way.  No stderr output generally means no error. And stderr content generally contains all of the information the end user needs.

So I cannot understand why somebody has gone to the laborious effort construct an email format for /usr/bin/certwatch output.

Errors should just be written to standard error and let crond handle it.  Otherwise certwatch is trying to be too clever.  Besides, it is probably a big mistake and a security risk to allow a background task to send email according to whatever, if any, email address might be written on a most probably expired certificate.

Comment 1 Fedora End Of Life 2012-08-07 16:37:40 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 JW 2012-08-08 00:03:52 UTC
still a problem

Comment 3 Fedora End Of Life 2013-07-04 05:56:23 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Joe Orton 2014-01-27 13:04:44 UTC
This is by design.

1. We want to generate multiple mails.
2. We want subject lines which clearly identify the warning, rather than "Cron ... stuff"
3. LogWatch has always worked the same way, a reasonable precedent.

Comment 5 JW 2014-01-29 22:04:14 UTC
(In reply to Joe Orton from comment #4)
> This is by design.
> 
> 1. We want to generate multiple mails.
>

So you have never heard of '~/.forward'? Or of '~/.procmailrc'? Or crond's MAILTO which I also mentioned? There are already multiple ways in which multiple email recipients can get their mail.

> 2. We want subject lines which clearly identify the warning, rather than
> "Cron ... stuff"

That is a crond bug that could/should be fixed.  A simply fix might be to allow crond to interpret possible email headers. If the standout/stderr of a job contains a line "Subject: .." immediately followed by an empty line then have crond use that as its email subject line rather than the standard one. In other words, if crond recognises the job's output looks like an email then use some of its header.

> 3. LogWatch has always worked the same way, a reasonable precedent.

Not a reasonable precedent! LogWatch is yet another annoying program that I always turn off post install. Two bad programs don't make one right.

Comment 6 Joe Orton 2014-02-13 23:24:47 UTC
What you are saying is that you don't agree with the choice of design.  That's fine; since this is free software you are free to create alternative software which follows a different design.  But "I do not agree with the design of the software" is not a useful bug report.  Please don't re-open this bug.

Comment 7 JW 2014-02-13 23:33:48 UTC
So what gives you the right to dictate to everybody else your own personal preference?  And why don't you ever modify your own opinion based on other expert opinion?

Why just close the bug without discussing the actual merit or otherwise of the points that I raise?

When you simply close the bug without responding to the particular points raised one can only assume that your dictatorial nature, and the exposed flaw in your original argument, leads you immediate close as "not a bug" as an act of spite.