Bug 830999 - tripwire cron should send mail to configured recipients
tripwire cron should send mail to configured recipients
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: tripwire (Show other bugs)
25
All Linux
unspecified Severity low
: ---
: ---
Assigned To: Didier
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-11 18:00 EDT by Scott Shambarger
Modified: 2017-03-03 18:49 EST (History)
1 user (show)

See Also:
Fixed In Version: tripwire-2.4.3.2-3.fc24 tripwire-2.4.3.2-3.fc25 tripwire-2.4.3.2-3.el6 tripwire-2.4.3.2-3.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-02-25 19:18:54 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
tripwire.cron.in patch to send email and produce no cron output on normal run (503 bytes, application/octet-stream)
2012-06-11 18:00 EDT, Scott Shambarger
no flags Details
Patch to cron script to send to configured email if set (866 bytes, patch)
2016-12-19 15:37 EST, Scott Shambarger
no flags Details | Diff

  None (edit)
Description Scott Shambarger 2012-06-11 18:00:42 EDT
Created attachment 591032 [details]
tripwire.cron.in patch to send email and produce no cron output on normal run

Description of problem:
cron.daily/tripwire-check does not correctly send mail to the mail recipient in twcfg.txt

Version-Release number of selected component (if applicable):
tripwire-2.4.2.2-1.fc17

How reproducible:
Always

Steps to Reproduce:
1. Set GLOBALEMAIL to email address to receive error reports
2. Rebuild configuration (twadmin -m F twcfg.txt)
3. Run the cron in cron.daily/tripwire-check
  
Actual results:
Errors/output are send to stdout (and therefore the default cron email recipient)

Expected results:
Errors should be send to the GLOBALEMAIL recipient in twcfg.txt

Additional info:
A simple fix is to add --email-report (or -M) to the tripwire command.  A better solution is to suppress cron output and only send error reports to the intended recipient as follows:

tripwire --check --email-report --silent --no-tty-output

I've added a patch that does the above.
Comment 1 Fedora End Of Life 2013-07-03 23:26:18 EDT
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 2 Scott Shambarger 2013-07-10 19:50:31 EDT
Same issue in F18, moving to this release.
Comment 3 Fedora End Of Life 2013-12-21 03:38:15 EST
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. 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 '18'.

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 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 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 18'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 Scott Shambarger 2013-12-21 14:24:29 EST
Issue still present in F20.

This is a simple fix... can we please get this applied?
Comment 5 Fedora End Of Life 2015-05-29 04:45:04 EDT
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. 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 EOL if it remains open with a Fedora  'version'
of '20'.

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.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 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 this bug is closed as described in the policy above.

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 6 Fedora End Of Life 2015-06-29 07:39:17 EDT
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 7 Scott Shambarger 2015-09-14 11:26:11 EDT
Bug still present in F22, re-opening.
Comment 8 Fedora Admin XMLRPC Client 2016-02-12 13:19:53 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 9 Fedora Admin XMLRPC Client 2016-04-16 06:05:51 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 10 Scott Shambarger 2016-05-16 21:57:10 EDT
Bug still present in F23, tripwire 2.4.3.1-10
Comment 11 Fedora End Of Life 2016-11-24 05:40:22 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. 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 EOL if it remains open with a Fedora  'version'
of '23'.

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.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 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 this bug is closed as described in the policy above.

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 12 Scott Shambarger 2016-11-27 04:53:42 EST
Bug still present in F24 (same tripwire version)
Comment 13 Didier 2016-12-16 02:58:32 EST
The parameter GLOBALEMAIL is not set by default into tw.cfg file and with your patch, email was not sent anyway (this behaviour is not wanted).
With email-report option only (without silent and no-tty-output options), email is sent twice (one by cron and one by tripwire)

It's not shocking to have to modify cron line if config file was modified.
Comment 14 Scott Shambarger 2016-12-16 13:46:56 EST
Thanks for responding Didier :)

The problem here is that if I have GLOBALEMAIL set in config (not replaced during upgarde), I still have to re-edit the cron line every time the package is upgraded to receive the email.  I've repeatedly missed this step when tripwire upgrades are lost in the occasional mass upgrade Fedora seems to get...

The cron email (default, w/o --silent) is sent every day, and so tripwire warnings are easily lost in the daily cron noise (and would involve filtering to recognize when it should be escalated)

The --email-report option can be controlled by EMAILREPORTLEVEL, and so can be selective.

I could easily update the patch so that it uses twadmin --print-cfgfile to check if GLOBALEMAIL is set, and use the --email-report in this case, and the default (non-silent) otherwise; that would keep the current behavior unless the user has explicitly requested the --email-report behavior.  Would that work?

Let me know.
Comment 15 Didier 2016-12-19 13:42:39 EST
Yes it's a good solution. Default behavior is not changed like this and it's solve your problem.
Comment 16 Scott Shambarger 2016-12-19 15:37 EST
Created attachment 1233562 [details]
Patch to cron script to send to configured email if set

Great, here's an updated patch (also fixes quotes in unconfigured message)
Comment 17 Fedora Update System 2017-02-03 03:13:48 EST
tripwire-2.4.3.2-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-a61733c059
Comment 18 Fedora Update System 2017-02-03 03:14:48 EST
tripwire-2.4.3.2-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-09385bf8dc
Comment 19 Fedora Update System 2017-02-03 17:55:01 EST
tripwire-2.4.3.2-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-a61733c059
Comment 20 Fedora Update System 2017-02-03 18:50:26 EST
tripwire-2.4.3.2-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-09385bf8dc
Comment 21 Fedora Update System 2017-02-09 03:48:25 EST
tripwire-2.4.3.2-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-c451d02b31
Comment 22 Fedora Update System 2017-02-09 03:50:27 EST
tripwire-2.4.3.2-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-d86357b3da
Comment 23 Scott Shambarger 2017-02-09 04:24:52 EST
Tested on F25, both positive and negative tests perform correctly with email sent, and no cron log if email configured in tripwire config.

Appears fixed!  Thanks.
Comment 24 Fedora Update System 2017-02-09 16:18:19 EST
tripwire-2.4.3.2-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-c451d02b31
Comment 25 Fedora Update System 2017-02-09 18:17:02 EST
tripwire-2.4.3.2-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-d86357b3da
Comment 26 Fedora Update System 2017-02-15 05:25:25 EST
tripwire-2.4.3.2-3.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-d22c0336d8
Comment 27 Fedora Update System 2017-02-15 05:25:52 EST
tripwire-2.4.3.2-3.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-4c7cf6ea72
Comment 28 Fedora Update System 2017-02-15 05:27:44 EST
tripwire-2.4.3.2-3.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-b5e7a3c732
Comment 29 Fedora Update System 2017-02-15 05:28:13 EST
tripwire-2.4.3.2-3.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-5994e7b9e9
Comment 30 Fedora Update System 2017-02-16 09:15:52 EST
tripwire-2.4.3.2-3.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-4c7cf6ea72
Comment 31 Fedora Update System 2017-02-16 12:18:32 EST
tripwire-2.4.3.2-3.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-d22c0336d8
Comment 32 Fedora Update System 2017-02-16 19:51:35 EST
tripwire-2.4.3.2-3.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-b5e7a3c732
Comment 33 Fedora Update System 2017-02-17 10:25:40 EST
tripwire-2.4.3.2-3.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-5994e7b9e9
Comment 34 Fedora Update System 2017-02-25 19:18:54 EST
tripwire-2.4.3.2-3.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
Comment 35 Fedora Update System 2017-02-25 20:36:25 EST
tripwire-2.4.3.2-3.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.
Comment 36 Fedora Update System 2017-03-03 18:49:29 EST
tripwire-2.4.3.2-3.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.
Comment 37 Fedora Update System 2017-03-03 18:49:55 EST
tripwire-2.4.3.2-3.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.