Bug 830999 - tripwire cron should send mail to configured recipients
Summary: tripwire cron should send mail to configured recipients
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: tripwire
Version: 25
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Didier Fabert (tartare)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-11 22:00 UTC by Scott Shambarger
Modified: 2017-03-03 23:49 UTC (History)
1 user (show)

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
Clone Of:
Environment:
Last Closed: 2017-02-26 00:18:54 UTC
Type: Bug
Embargoed:


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 22:00 UTC, Scott Shambarger
no flags Details
Patch to cron script to send to configured email if set (866 bytes, patch)
2016-12-19 20:37 UTC, Scott Shambarger
no flags Details | Diff

Description Scott Shambarger 2012-06-11 22:00:42 UTC
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-04 03:26:18 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 2 Scott Shambarger 2013-07-10 23:50:31 UTC
Same issue in F18, moving to this release.

Comment 3 Fedora End Of Life 2013-12-21 08:38:15 UTC
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 19:24:29 UTC
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 08:45:04 UTC
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 11:39:17 UTC
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 15:26:11 UTC
Bug still present in F22, re-opening.

Comment 8 Fedora Admin XMLRPC Client 2016-02-12 18:19:53 UTC
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 10:05:51 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 10 Scott Shambarger 2016-05-17 01:57:10 UTC
Bug still present in F23, tripwire 2.4.3.1-10

Comment 11 Fedora End Of Life 2016-11-24 10:40:22 UTC
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 09:53:42 UTC
Bug still present in F24 (same tripwire version)

Comment 13 Didier Fabert (tartare) 2016-12-16 07:58:32 UTC
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 18:46:56 UTC
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 Fabert (tartare) 2016-12-19 18:42:39 UTC
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 20:37:07 UTC
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 08:13:48 UTC
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 08:14:48 UTC
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 22:55:01 UTC
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 23:50:26 UTC
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 08:48:25 UTC
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 08:50:27 UTC
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 09:24:52 UTC
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 21:18:19 UTC
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 23:17:02 UTC
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 10:25:25 UTC
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 10:25:52 UTC
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 10:27:44 UTC
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 10:28:13 UTC
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 14:15:52 UTC
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 17:18:32 UTC
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-17 00:51:35 UTC
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 15:25:40 UTC
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-26 00:18:54 UTC
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-26 01:36:25 UTC
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 23:49:29 UTC
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 23:49:55 UTC
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.