diff --git a/puppet/zulip/manifests/postfix_localmail.pp b/puppet/zulip/manifests/postfix_localmail.pp index 737a4a4961..9a5e0be845 100644 --- a/puppet/zulip/manifests/postfix_localmail.pp +++ b/puppet/zulip/manifests/postfix_localmail.pp @@ -45,7 +45,7 @@ class zulip::postfix_localmail { mode => '0644', owner => root, group => root, - source => 'puppet:///modules/zulip/postfix/virtual', + content => template('zulip/postfix/virtual.erb'), require => Package[postfix], notify => Service['postfix'], } diff --git a/puppet/zulip/files/postfix/virtual b/puppet/zulip/templates/postfix/virtual.erb similarity index 73% rename from puppet/zulip/files/postfix/virtual rename to puppet/zulip/templates/postfix/virtual.erb index 96e1a9bfcd..09c8db7d93 100644 --- a/puppet/zulip/files/postfix/virtual +++ b/puppet/zulip/templates/postfix/virtual.erb @@ -1,6 +1,7 @@ +if /@<%= Regexp.escape(@postfix_mailname) %>\.?$/ # Changes to this list require a corresponding change to `access` as # well. - /\+.*@/ zulip@localhost /\..*@/ zulip@localhost /^mm/ zulip@localhost +endif