summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/mlmmj.pp9
-rw-r--r--templates/postfix/mlmmj/transport_regexp.erb1
-rw-r--r--templates/postfix/mlmmj/virtual_regexp.erb2
3 files changed, 9 insertions, 3 deletions
diff --git a/manifests/mlmmj.pp b/manifests/mlmmj.pp
index 52b9bd0..a8fc9ff 100644
--- a/manifests/mlmmj.pp
+++ b/manifests/mlmmj.pp
@@ -30,10 +30,17 @@ class mail::mlmmj {
#}
postfix::transport_regexp_snippet { 'mlmmj_transport_regexp':
- content => template('mail/postfix/mlmmj/transport_regexp.erb'),
+ content => '',
}
postfix::virtual_regexp_snippet { 'mlmmj_virtual_regexp':
content => template('mail/postfix/mlmmj/virtual_regexp.erb'),
}
+
+ define list($ensure = 'present') {
+ postfix::transport_regexp_snippet { "mlmmj_transport_regexp-$name":
+ content => "/^($name).*$/ mlmmj:$name",
+ ensure => $ensure,
+ }
+ }
}
diff --git a/templates/postfix/mlmmj/transport_regexp.erb b/templates/postfix/mlmmj/transport_regexp.erb
index ff6cf12..e69de29 100644
--- a/templates/postfix/mlmmj/transport_regexp.erb
+++ b/templates/postfix/mlmmj/transport_regexp.erb
@@ -1 +0,0 @@
-/^(.*)\@<%= mlmmj_subdomain.gsub(/\./, '\.') %>\.(.*)$/ mlmmj:${1}
diff --git a/templates/postfix/mlmmj/virtual_regexp.erb b/templates/postfix/mlmmj/virtual_regexp.erb
index a500819..77811dd 100644
--- a/templates/postfix/mlmmj/virtual_regexp.erb
+++ b/templates/postfix/mlmmj/virtual_regexp.erb
@@ -1 +1 @@
-/^(.*)\@<%= mlmmj_subdomain.gsub(/\./, '\.') %>\.(.*)$/ $1@$2
+/^(.*)\@<%= mlmmj_subdomain.gsub(/\./, '\.') %>\.(.*)$/ ${1}