From b8244798d3ad64f3e877a03b647a5cb697ebd5a4 Mon Sep 17 00:00:00 2001 From: Ossi Salmi Date: Tue, 1 Apr 2014 11:29:22 +0300 Subject: [PATCH] logwatch: Add support for setting the mail sender address --- logwatch/manifests/init.pp | 5 ++++- logwatch/templates/logwatch.conf.erb | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/logwatch/manifests/init.pp b/logwatch/manifests/init.pp index f1b33be..40f69ff 100644 --- a/logwatch/manifests/init.pp +++ b/logwatch/manifests/init.pp @@ -3,7 +3,10 @@ # === Global variables # # $logwatch_mailto: -# Logwatch mail recipient. +# Logwatch mail recipient address. +# +# $logwatch_mailfrom: +# Logwatch mail sender address. # # $logwatch_level: # Logwatch detail level for report. Valid values are diff --git a/logwatch/templates/logwatch.conf.erb b/logwatch/templates/logwatch.conf.erb index ab25923..d3b501a 100644 --- a/logwatch/templates/logwatch.conf.erb +++ b/logwatch/templates/logwatch.conf.erb @@ -2,6 +2,9 @@ <% if @logwatch_mailto -%> MailTo = <%= @logwatch_mailto %> <% end -%> +<% if @logwatch_mailfrom -%> +MailFrom = <%= @logwatch_mailfrom %> +<% end -%> <% if @logwatch_level -%> Detail = <%= @logwatch_level %> <% end -%>