Bug 1126758 - MailTo specified in config file ignored
Summary: MailTo specified in config file ignored
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: logwatch
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Synacek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1126408
TreeView+ depends on / blocked
 
Reported: 2014-08-05 08:24 UTC by Jan Synacek
Modified: 2014-08-05 09:17 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1126408
Environment:
Last Closed: 2014-08-05 09:17:38 UTC


Attachments (Terms of Use)

Description Jan Synacek 2014-08-05 08:24:30 UTC
+++ This bug was initially created as a clone of Bug #1126408 +++

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 1 Jan Synacek 2014-08-05 09:17:38 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.