diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-06-27 19:01:51 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-06-27 19:01:51 -0300 |
commit | 7df45a71a00b9cd5441e30abddcbbc0ed8f66485 (patch) | |
tree | 260c1c79c43cbd0cd454a993bf7349786e7424a5 /manifests | |
parent | 3fd2e785698ce9eb2acaa9e142bacd5341a9b04b (diff) | |
download | puppet-mail-7df45a71a00b9cd5441e30abddcbbc0ed8f66485.tar.gz puppet-mail-7df45a71a00b9cd5441e30abddcbbc0ed8f66485.tar.bz2 |
Ensure we have full domains on mlmmj regexps
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/mlmmj/list.pp | 12 |
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, } } |