]> gitweb.fluxo.info Git - puppet-mail.git/commitdiff
Be more explicit on virtual and transport regexps and allow more virtual domains...
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 27 Jun 2013 19:47:54 +0000 (16:47 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 27 Jun 2013 19:47:54 +0000 (16:47 -0300)
manifests/firma.pp
manifests/firma/domain.pp [new file with mode: 0644]
manifests/mlmmj.pp
manifests/mlmmj/domain.pp [new file with mode: 0644]
manifests/sympa.pp
manifests/sympa/domain.pp [new file with mode: 0644]
templates/firma/transport_regexp.erb
templates/firma/virtual_regexp.erb
templates/mlmmj/virtual_regexp.erb
templates/sympa/transport_regexp.erb
templates/sympa/virtual_regexp.erb

index 0d4ea84396ab569063a285899041f69f63ae0b9b..56627330e8702406c757b57bf683aecdc5eb411a 100644 (file)
@@ -7,13 +7,7 @@ class mail::firma(
 
   postfix::config { "firma_destination_recipient_limit": value => '1', nonstandard => true }
 
-  postfix::transport_regexp_snippet { 'firma_transport_regexp':
-    content => template('mail/firma/transport_regexp.erb'),
-  }
-
-  postfix::virtual_regexp_snippet { 'firma_virtual_regexp':
-    content => template('mail/firma/virtual_regexp.erb'),
-  }
+  mail::firma::domain { "${subdomain}.${domain}": }
 
   postfix::transport { "${subdomain}.$domain":
     ensure      => absent,
diff --git a/manifests/firma/domain.pp b/manifests/firma/domain.pp
new file mode 100644 (file)
index 0000000..6f6a794
--- /dev/null
@@ -0,0 +1,11 @@
+define mail::firma::domain() {
+  $subdomain = $name
+
+  postfix::transport_regexp_snippet { "firma_transport_regexp-${name}":
+    content => template('mail/firma/transport_regexp.erb'),
+  }
+
+  postfix::virtual_regexp_snippet { "firma_virtual_regexp-${name}":
+    content => template('mail/firma/virtual_regexp.erb'),
+  }
+}
index dcb6d2f061c4d7654ccc19a3f414f8bfbd1e711c..56bfc647ece4a7366885521f2063a475f135793e 100644 (file)
@@ -32,11 +32,5 @@ class mail::mlmmj(
   #  require  => User['mlmmj'],
   #}
 
-  #postfix::transport_regexp_snippet { 'mlmmj_transport_regexp':
-  #  content => template('mail/mlmmj/transport_regexp.erb'),
-  #}
-
-  postfix::virtual_regexp_snippet { 'mlmmj_virtual_regexp':
-    content => template('mail/mlmmj/virtual_regexp.erb'),
-  }
+  mail::mlmmj::domain { "${subdomain}.${domain}": }
 }
diff --git a/manifests/mlmmj/domain.pp b/manifests/mlmmj/domain.pp
new file mode 100644 (file)
index 0000000..f193cc7
--- /dev/null
@@ -0,0 +1,11 @@
+define mail::mlmmj::domain() {
+  $subdomain = $name
+
+  #postfix::transport_regexp_snippet { 'mlmmj_transport_regexp':
+  #  content => template('mail/mlmmj/transport_regexp.erb'),
+  #}
+
+  postfix::virtual_regexp_snippet { 'mlmmj_virtual_regexp':
+    content => template('mail/mlmmj/virtual_regexp.erb'),
+  }
+}
index 4ba528aef4339bbbecdf8f1140a3b3dfa2376a30..2c9a3732eafc8f08031daba6043f8ae759bf59b9 100644 (file)
@@ -102,13 +102,7 @@ class mail::sympa(
     require  => Service['sympa'],
   }
 
-  postfix::transport_regexp_snippet { 'sympa_transport_regexp':
-    content => template('mail/sympa/transport_regexp.erb'),
-  }
-
-  postfix::virtual_regexp_snippet { 'sympa_virtual_regexp':
-    content => template('mail/sympa/virtual_regexp.erb'),
-  }
+  mail::sympa::domain { "${subdomain}.${domain}": }
 
   postfix::config {
     "sympa_destination_recipient_limit":       value => '1', nonstandard => true;
diff --git a/manifests/sympa/domain.pp b/manifests/sympa/domain.pp
new file mode 100644 (file)
index 0000000..7da9a89
--- /dev/null
@@ -0,0 +1,11 @@
+define mail::sympa::domain() {
+  $subdomain = $name
+
+  postfix::transport_regexp_snippet { 'sympa_transport_regexp':
+    content => template('mail/sympa/transport_regexp.erb'),
+  }
+
+  postfix::virtual_regexp_snippet { 'sympa_virtual_regexp':
+    content => template('mail/sympa/virtual_regexp.erb'),
+  }
+}
index 27c65af09ccb63337435a9602d7d496b6d01947b..fb715f5fc199926fca3d2c54381d13deba09e62b 100644 (file)
@@ -1,2 +1,2 @@
-/^.*+request\@<%= subdomain.gsub(/\./, '\.') %>\.(.*)$/ firmarequest:
-/^.*\@<%= subdomain.gsub(/\./, '\.') %>\.(.*)$/       firma:
+/^.*+request\@<%= subdomain.gsub(/\./, '\.') %>$/ firmarequest:
+/^.*\@<%= subdomain.gsub(/\./, '\.') %>$/       firma:
index 767f3c1c4c990d72f3972a1071809a7916a9fc3b..310cacd5584b24b408beafa0a72aba4bc84c1f3b 100644 (file)
@@ -1 +1 @@
-/^(.*)-request\@<%= subdomain.gsub(/\./, '\.') %>\.(.*)$/    $1+request@<%= subdomain %>.$2
+/^(.*)-request\@<%= subdomain.gsub(/\./, '\.') %>$/    $1+request@<%= subdomain %>
index 57f1a72710843cf9e9b49b18c066f91cc87a1e64..e93ebcdd22001b231a45505dae92a7c1fa626936 100644 (file)
@@ -1 +1 @@
-/^(.*)\@<%= subdomain.gsub(/\./, '\.') %>\.(.*)$/                    ${1}
+/^(.*)\@<%= subdomain.gsub(/\./, '\.') %>$/                    ${1}
index 1e32e2a050a226c301cbd3aa7628991188008e6e..6323836030cfe6e6fdd6665094af76cc45f6c4f8 100644 (file)
@@ -1,2 +1,2 @@
-/^.*+owner\@<%= subdomain.gsub(/\./, '\.') %>\.(.*)$/ sympabounce:
-/^.*\@<%= subdomain.gsub(/\./, '\.') %>\.(.*)$/       sympa:
+/^.*+owner\@<%= subdomain.gsub(/\./, '\.') %>$/ sympabounce:
+/^.*\@<%= subdomain.gsub(/\./, '\.') %>$/       sympa:
index f5883d7c8ae7b39d8c6047463d76b119d2db704a..b82b9df9bc20f48400ec60cfea7855c2c6831ff9 100644 (file)
@@ -1 +1 @@
-/^(.*)-owner\@<%= subdomain.gsub(/\./, '\.') %>\.(.*)$/    $1+owner@<%= subdomain %>.$2
+/^(.*)-owner\@<%= subdomain.gsub(/\./, '\.') %>$/    $1+owner@<%= subdomain %>