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, }