- Resolves: #450494 MailTo configuration parameter is ignored

This commit is contained in:
Ivana Varekova 2008-06-10 12:36:59 +00:00
parent cf7c500e3a
commit d098b49636
2 changed files with 21 additions and 16 deletions

View File

@ -1,17 +1,18 @@
diff -up logwatch-7.3.6/scripts/logwatch.pl.pom logwatch-7.3.6/scripts/logwatch.pl
--- logwatch-7.3.6/scripts/logwatch.pl.pom 2008-01-08 11:04:59.000000000 +0100
+++ logwatch-7.3.6/scripts/logwatch.pl 2008-01-08 11:23:09.000000000 +0100
@@ -359,6 +359,13 @@ if ($ShowVersion) {
exit 0;
}
--- logwatch-7.3.6/scripts/logwatch.pl.pom 2008-06-10 14:29:41.000000000 +0200
+++ logwatch-7.3.6/scripts/logwatch.pl 2008-06-10 14:32:51.000000000 +0200
@@ -61,7 +61,13 @@ my (@ReadConfigNames, @ReadConfigValues)
+#if MAILTO is set in the environment, grab it as we may be being used by
+#cron or anacron, which do not set command line args.
+if ($ENV{'MAILTO'})
+{
+ $Config{'mailto'} = $ENV{'MAILTO'};
+}
+
if ($tmp_mailto) {
$Config{'mailto'} = $tmp_mailto;
$Config{'print'} = 0;
# Default config here...
$Config{'detail'} = 0;
-$Config{'mailto'} = "root";
+# if MAILTO is set in the environment, grab it, as it may be used by cron
+# or anacron
+if ($ENV{'MAILTO'}) {
+ $Config{'mailto'} = $ENV{'MAILTO'};
+} else {
+ $Config{'mailto'} = "root";
+}
$Config{'mailfrom'} = "Logwatch";
$Config{'save'} = "";
$Config{'print'} = 1;

View File

@ -1,7 +1,7 @@
Summary: A log file analysis program
Name: logwatch
Version: 7.3.6
Release: 22%{?dist}
Release: 23%{?dist}
License: MIT
Group: Applications/System
URL: http://www.logwatch.org/
@ -201,6 +201,10 @@ rm -rf %{buildroot}
%doc License project/CHANGES
%changelog
* Tue Jun 10 2008 Ivana Varekova <varekova@redhat.com> 7.3.6-23
- Resolves: #450494
MailTo configuration parameter is ignored
* Wed Apr 30 2008 Ivana Varekova <varekova@redhat.com> 7.3.6-22
- Resolves: #436719
Logwatch doesn't show any usable sendmail section