RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1126408 - MailTo specified in config file ignored
Summary: MailTo specified in config file ignored
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: logwatch
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jan Synacek
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On: 1126758
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-04 11:36 UTC by Martin Frodl
Modified: 2014-08-05 09:17 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1126758 (view as bug list)
Environment:
Last Closed: 2014-08-05 09:17:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Martin Frodl 2014-08-04 11:36:15 UTC
Description of problem:

There are two ways to specify the e-mail recipient of logwatch reports: the MailTo directive in configuration file and the --mailto command-line option, the latter overriding the former. While the command-line way seems to work correctly, MailTo recipient defined in config file is ignored. Instead of sending mail, the logwatch report is printed to standard output.

Version-Release number of selected component (if applicable):
logwatch-7.4.0-28.20130522svn140.el7

How reproducible:
100%

Steps to Reproduce:

Keep the default configuration file /usr/share/logwatch/default.conf/logwatch.conf, which contains the line 'MailTo = root' already. Set the time range to 'all' by doing either of the following:

a. change 'Range = yesterday' to 'Range = all' in logwatch.conf,
   then run 'logwatch'
or
b. run 'logwatch --range all'

Run 'mail' to check whether root's inbox contains any new messages.

Actual results:
The report is printed to standard output.
No mail for root.

Expected results:
logwatch produces no output.
There is a new message in /var/spool/mail/root.

Additional info:

When mail recipient is set by the --mailto command-line option instead of the MailTo directive, the actual behaviour coincides with the expected.

This bug does not exist on either RHEL 5 or 6.

Comment 2 Jan Synacek 2014-08-05 09:17:19 UTC
By default, Output is set to 'stdout'. Change it to 'mail' if you want logwatch to send emails instead of printing to the console. The '--mailto' argument overrides the Output configuration option, therefore it is mailed correctly.


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