Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

puppet: Only match incoming gateway address on our mail domain.

Alex Vandivera53092687e13
diff --git a/puppet/zulip/manifests/postfix_localmail.pp b/puppet/zulip/manifests/postfix_localmail.pp
index 737a4a4961a..9a5e0be845e 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 96e1a9bfcd2..09c8db7d930 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