]> gitweb.fluxo.info Git - puppet-mail.git/commitdiff
Fixing mydestination and adding sympa disable classes
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 30 Aug 2010 18:09:23 +0000 (15:09 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 30 Aug 2010 18:09:23 +0000 (15:09 -0300)
manifests/sympa.pp
manifests/system.pp
manifests/web.pp

index e526f7a30110f6df3c90b131901012036afe36ef..a9c45d3b92d2ce0cf890b9a8204e636e091ff63d 100644 (file)
@@ -103,3 +103,32 @@ class mail::sympa inherits mail::regexps {
     notify    => Exec["newaliases"],
   }
 }
+
+class mail::sympa::disabled inherits mail::sympa {
+  include mail::web::sympa::disabled
+
+  Service["sympa"] {
+    ensure    => stopped,
+    enable    => false,
+  }
+
+  File["/etc/postfix/transport_regexp"] {
+    content => undef,
+  }
+
+  File["/etc/postfix/virtual_regexp"] {
+    content => undef,
+  }
+
+  Mailalias["sympa"] {
+    ensure => absent,
+  }
+
+  Mailalias["sympa-request"] {
+    ensure => absent,
+  }
+
+  Mailalias["sympa-owner"] {
+    ensure => absent,
+  }
+}
index 5207f4d125d80b3ea5ade87e9fc2bd3755076c93..35cb2b902ce5e773aa38862eb9aee4bce6b2e521 100644 (file)
@@ -10,6 +10,10 @@ class mail::system {
     '': { $postfix_mynetworks = "127.0.0.0/8" }
   }
 
+  case $sympa_subdomain {
+    '': { $sympa_subdomain = "lists" }
+  }
+
   # Module requirements
   include postfix
   include ssl::mail
@@ -34,13 +38,12 @@ class mail::system {
   # Sympa mailing list manager
   case $mail_sympa {
     true: {
-      case $sympa_subdomain {
-        '': { $sympa_subdomain = "lists" }
-      }
-
-      $sympa_mydestination = "${sympa_subdomain}.${domain}"
+      $sympa_mydestination = ", ${sympa_subdomain}.${domain}"
       include mail::sympa
     }
+    'disabled': {
+      include mail::sympa::disabled
+    }
     default: {
       include mail::regexps
     }
@@ -53,13 +56,13 @@ class mail::system {
         '': { $schleuder_subdomain = "encrypted" }
       }
 
-      $schleuder_mydestination = "${schleuder_subdomain}.${domain}"
+      $schleuder_mydestination = "${schleuder_subdomain}.${domain}"
       include mail::schleuder
     }
   }
 
   case $postfix_mydestination {
-    '': { $postfix_mydestination = "${postfix_my_defaultdestination} ${sympa_mydestination} ${schleuder_mydestination}" }
+    '': { $postfix_mydestination = "${postfix_my_defaultdestination}${sympa_mydestination}${schleuder_mydestination}" }
   }
 
   # Include base configuration
index 73db06c00a697937a5dca9b13a8599ea5cac6db0..208381a43ed656174fe11e06c5e33d8839f9cfed 100644 (file)
@@ -52,3 +52,9 @@ class mail::web::sympa inherits websites::setup {
     require => File["${apache_www_folder}/${sympa_subdomain}"],
   }
 }
+
+class mail::web::sympa::disabled inherits mail::web::sympa {
+  Apache::site["$sympa_subdomain"] {
+    ensure => absent,
+  }
+}