From: Ismaƫl Bouya Date: Thu, 11 Apr 2019 06:48:31 +0000 (+0200) Subject: Add default target for e-mails X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FPuppet.git;a=commitdiff_plain;h=528b0cf99b8e62789f982970ee3766ec4f54133f Add default target for e-mails --- diff --git a/modules/profile/manifests/mail.pp b/modules/profile/manifests/mail.pp index cc47b77..0b4a7a5 100644 --- a/modules/profile/manifests/mail.pp +++ b/modules/profile/manifests/mail.pp @@ -1,6 +1,7 @@ class profile::mail ( String $mailhub, Optional[Integer] $mailhub_port = 25, + Optional[String] $default_target = "postmaster", ) { ensure_packages(["s-nail", "ssmtp"]) diff --git a/modules/profile/templates/mail/ssmtp.conf.erb b/modules/profile/templates/mail/ssmtp.conf.erb index e7a0410..1766140 100644 --- a/modules/profile/templates/mail/ssmtp.conf.erb +++ b/modules/profile/templates/mail/ssmtp.conf.erb @@ -3,7 +3,7 @@ # # The person who gets all mail for userids < 1000 # Make this empty to disable rewriting. -root=postmaster +root=<%= @default_target %> # The place where the mail goes. The actual machine name is required # no MX records are consulted. Commonly mailhosts are named mail.domain.com # The example will fit if you are in domain.com and you mailhub is so named.