summaryrefslogtreecommitdiff
path: root/manifests/mlmmj
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-06-27 19:01:51 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-06-27 19:01:51 -0300
commit7df45a71a00b9cd5441e30abddcbbc0ed8f66485 (patch)
tree260c1c79c43cbd0cd454a993bf7349786e7424a5 /manifests/mlmmj
parent3fd2e785698ce9eb2acaa9e142bacd5341a9b04b (diff)
downloadpuppet-mail-7df45a71a00b9cd5441e30abddcbbc0ed8f66485.tar.gz
puppet-mail-7df45a71a00b9cd5441e30abddcbbc0ed8f66485.tar.bz2
Ensure we have full domains on mlmmj regexps
Diffstat (limited to 'manifests/mlmmj')
-rw-r--r--manifests/mlmmj/list.pp12
1 files changed, 9 insertions, 3 deletions
diff --git a/manifests/mlmmj/list.pp b/manifests/mlmmj/list.pp
index 13f30a9..9de5c06 100644
--- a/manifests/mlmmj/list.pp
+++ b/manifests/mlmmj/list.pp
@@ -6,14 +6,20 @@
# version 2.3 and later).
#
# That's why we need one definition per mailing list.
-define mail::mlmmj::list($ensure = 'present') {
+define mail::mlmmj::list(
+ $ensure = 'present',
+ $subdomain = hiera('mail::mlmmj::subdomain', $mail::mlmmj::params::subdomain),
+ $tld = $::domain
+) {
+ $fulldomain = regsubst("${subdomain}.${tld}", '\.', '\.', 'G')
+
postfix::transport_regexp_snippet { "mlmmj_transport_regexp-${name}":
- content => "/^(${name})\\@.*$/ mlmmj:${name}\n",
+ content => "/^(${name})\\@${fulldomain}$/ mlmmj:${name}\n",
ensure => $ensure,
}
postfix::transport_regexp_snippet { "mlmmj_transport_regexp-${name}-request":
- content => "/^(${name})\\+.*\\@.*$/ mlmmj:${name}\n",
+ content => "/^(${name})\\+.*\\@${fulldomain}$/ mlmmj:${name}\n",
ensure => $ensure,
}
}