From d8c8c1dba8bcd0df2f3b7259995c21f5c90da3ff Mon Sep 17 00:00:00 2001 From: Rune Philosof Date: Fri, 24 Oct 2014 13:26:38 +0200 Subject: [PATCH] include fqdn in mydestination When using a different sender_hostname than fqdn, then include fqdn in mydestination. --- manifests/relay.pp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/manifests/relay.pp b/manifests/relay.pp index 27a3c0e..4d4b6f4 100644 --- a/manifests/relay.pp +++ b/manifests/relay.pp @@ -29,7 +29,12 @@ postfix::config::maincfhelper { 'myorigin': value => $sender_hostname, } - postfix::config::maincfhelper { 'mydestination': value => "${sender_hostname}, ${::hostname}, localhost.localdomain, localhost", } + if $::fqdn != $sender_hostname { + postfix::config::maincfhelper { 'mydestination': value => "${sender_hostname}, ${::fqdn}, ${::hostname}, localhost.localdomain, localhost", } + } + else { + postfix::config::maincfhelper { 'mydestination': value => "${sender_hostname}, ${::hostname}, localhost.localdomain, localhost", } + } postfix::config::maincfhelper { 'relayhost': value => $relayhost, }