summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-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,
}
}