]> gitweb.fluxo.info Git - puppet-mail.git/commitdiff
Refactoring for 2.7 compatibility
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 21 Jan 2013 20:01:00 +0000 (18:01 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 21 Jan 2013 20:01:00 +0000 (18:01 -0200)
29 files changed:
manifests/amavisd.pp
manifests/base.pp
manifests/dovecot.pp
manifests/firma.pp
manifests/mlmmj.pp
manifests/packages.pp
manifests/postfixadmin.pp
manifests/schleuder.pp
manifests/sympa.pp
manifests/system.pp
manifests/virtual.pp
manifests/web.pp
templates/dovecot/dovecot-sql.conf.erb
templates/postfix/firma/transport_regexp.erb
templates/postfix/firma/virtual_regexp.erb
templates/postfix/mlmmj/virtual_regexp.erb
templates/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf.erb
templates/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf.erb
templates/postfix/sql/mysql_virtual_alias_domain_maps.cf.erb
templates/postfix/sql/mysql_virtual_alias_maps.cf.erb
templates/postfix/sql/mysql_virtual_domains_maps.cf.erb
templates/postfix/sql/mysql_virtual_mailbox_limit_maps.cf.erb
templates/postfix/sql/mysql_virtual_mailbox_maps.cf.erb
templates/postfix/sympa/transport_regexp.erb
templates/postfix/sympa/virtual_regexp.erb
templates/postfixadmin/config.inc.php.erb
templates/sympa/dbconfig-common.squeeze.erb
templates/sympa/sympa.conf.lenny.erb
templates/sympa/sympa.conf.squeeze.erb

index 7d15804d5f4cdd5fc5b1a526ffed818750f7a0cf..12accfa679737d80be1af43bc0b1b1f53cf7fbe4 100644 (file)
@@ -41,7 +41,7 @@ class mail::amavisd {
     notify => Service['amavis'],
   }
 
-  case $lsbdistcodename {
+  case $::lsbdistcodename {
     'lenny': { }
     default: {
       file { "/etc/amavis/conf.d/05-node_id":
index f4bb97fc1c42d19eb8eb5bec3b1fbdc9fcf5d9f7..c6dd4af6cd42c4673c5e23cee77ccefd8ac60040 100644 (file)
@@ -1,11 +1,11 @@
 class mail::base {
   # Postfix configuration
   postfix::config {
-    "mydomain":                            value => "$domain";
-    "myhostname":                          value => "$fqdn";
-    "mydestination":                       value => "$postfix_mydestination";
-    "mynetworks":                          value => "$postfix_mynetworks";
-    "relay_domains":                       value => "$postfix_relay_domains";
+    "mydomain":                            value => "$::domain";
+    "myhostname":                          value => "$::fqdn";
+    "mydestination":                       value => "${mail::system::postfix_mydestination}";
+    "mynetworks":                          value => "${mail::system::postfix_mynetworks}";
+    "relay_domains":                       value => "${mail::system::postfix_relay_domains}";
     "transport_maps":                      value => "hash:/etc/postfix/transport, regexp:/etc/postfix/transport_regexp";
     "mailbox_command":                     value => '/usr/bin/maildrop -d ${USER}';
     "virtual_mailbox_base":                value => '/var/mail/virtual';
@@ -15,7 +15,7 @@ class mail::base {
   }
 
   # Postgrey port configuration
-  $postgrey_port = $lsbdistcodename ? {
+  $postgrey_port = $::lsbdistcodename ? {
     'lenny' => '60000',
     default => '10023',
   }
index c0546787e241c910285ca7da1c34bc5164335850..c4f7b4b7c885f142757acee56b9d5d949c0a2340 100644 (file)
@@ -10,7 +10,7 @@ class mail::dovecot {
     owner   => root,
     group   => vmail,
     mode    => 0644,
-    content => template("mail/dovecot/dovecot.conf.${lsbdistcodename}.erb"),
+    content => template("mail/dovecot/dovecot.conf.${::lsbdistcodename}.erb"),
     notify  => Service['dovecot'],
   }
 
index c1ab5a99be157489c4a6c73086f5c93f7f723485..ec59879984752339bea691e207df12bd7b788b56 100644 (file)
@@ -1,4 +1,7 @@
-class mail::firma {
+class mail::firma(
+  $subdomain = hiera('firma_subdomain', 'firma')
+) {
+
   # Firma subsystems
   include mail::packages::firma
 
@@ -12,7 +15,7 @@ class mail::firma {
     content => template('mail/postfix/firma/virtual_regexp.erb'),
   }
 
-  postfix::transport { "${firma_subdomain}.$domain":
+  postfix::transport { "${subdomain}.$domain":
     ensure      => absent,
     destination => "firma",
   }
index 9db4356bf14131bd0ebcf82241741713a521e949..6c58b79c3cfc06e1cb8cf1792b72d575854a2b17 100644 (file)
@@ -1,4 +1,7 @@
-class mail::mlmmj {
+class mail::mlmmj(
+  $subdomain = hiera('mlmmj_subdomain', 'mlmmj')
+) {
+
   include mail::packages::mlmmj
   include mail::web::mlmmj::disabled
 
@@ -46,13 +49,13 @@ class mail::mlmmj {
   #
   # That's why we need one definition per mailing list.
   define list($ensure = 'present') {
-    postfix::transport_regexp_snippet { "mlmmj_transport_regexp-$name":
-      content => "/^($name)\\@.*$/    mlmmj:$name\n",
+    postfix::transport_regexp_snippet { "mlmmj_transport_regexp-${name}":
+      content => "/^(${name})\\@.*$/    mlmmj:${name}\n",
       ensure  => $ensure,
     }
 
-    postfix::transport_regexp_snippet { "mlmmj_transport_regexp-$name-request":
-      content => "/^($name)\\+.*\\@.*$/    mlmmj:$name\n",
+    postfix::transport_regexp_snippet { "mlmmj_transport_regexp-${name}-request":
+      content => "/^(${name})\\+.*\\@.*$/    mlmmj:${name}\n",
       ensure  => $ensure,
     }
   }
index 548b8336d5436f26e0d6253d6ae493fe1712dddc..2e3649ddb908429ff71b251b324e4a15b315d035 100644 (file)
@@ -27,7 +27,7 @@ class mail::packages::virtual {
   }
 
   # Squeeze (or newer) packages
-  if $lsbdistcodename != 'lenny' {
+  if $::lsbdistcodename != 'lenny' {
     package { [ 'roundcube', 'roundcube-sqlite', 'roundcube-plugins', 'roundcube-plugins-extra' ]:
       ensure => latest,
     } 
index 07d555b8be3490d8f90bec7e6aea1210944969ef..3ab50e4b687459e5b9d43de60b0eade600907737 100644 (file)
@@ -1,9 +1,19 @@
-class mail::postfixadmin {
+class mail::postfixadmin(
+  $database_user = hiera('postfixadmin_database_user', 'postfix'),
+  $database_host = hiera('postfixadmin_database_host', 'localhost'),
+  $database_name = hiera('postfixadmin_database_name', 'postfix'),
+  $database_password = hiera('postfixadmin_database_password', ''),
+) {
+  # Class configuration
+  case $database_password {
+    '': { fail("You need to define database_password host config") }
+  }
+
   #
   # Database configuration
   #
-  database::instance { "$postfixadmin_database_name":
-    password => "$postfixadmin_database_password",
+  database::instance { "${database_name}":
+    password => "${database_password}",
   }
 
   #
index b9c502ecc1786727e83ae06e7172db5ef9a1db06..1f42fcd88824a5c42672e97ca31b05e7bbe56716 100644 (file)
@@ -1,10 +1,13 @@
-class mail::schleuder {
+class mail::schleuder(
+  $subdomain = hiera('schleuder_subdomain', 'encrypted')
+) {
+
   # Schleuder subsystems
   include mail::packages::schleuder
 
   postfix::config { "schleuder_destination_recipient_limit": value => '1', nonstandard => true }
 
-  postfix::transport { "${schleuder_subdomain}.$domain":
+  postfix::transport { "${subdomain}.$domain":
     ensure      => present,
     destination => "schleuder",
   }
index 5b042d536352d8565ad8708c715a5a7ba69413b5..0ba784110670680bf6d522862f6ae3aeaba568ce 100644 (file)
@@ -1,35 +1,27 @@
 class mail::sympa {
-  # Sympa subsystems
-  include mail::web::sympa
-  include mail::packages::sympa
-
   # Class configuration
-  case $sympa_database_password {
-    '': { fail("You need to define \$sympa_database_password host config") }
-  }
-
-  case $sympa_database_name {
-    '': { $sympa_database_name= "sympa" }
-  }
+  $database_password = hiera('sympa_database_password', '')
+  $database_name = hiera('sympa_database_name', 'sympa')
+  $database_host = hiera('sympa_database_host', 'localhost')
+  $listmasters = hiera('sympa_listmasters', "listmaster@${fqdn}")
+  $lang = hiera('sympa_lang', 'en_US')
+  $subdomain = hiera('sympa_subdomain', 'lists')
+  $logo_html_definition = hiera('sympa_logo_html_definition', '')
 
-  case $sympa_database_host {
-    '': { $sympa_database_host = "localhost" }
+  case $database_password {
+    '': { fail("You need to define database_password host config") }
   }
 
-  case $sympa_listmasters {
-    '': { $sympa_listmasters = "listmaster@${fqdn}" }
-  }
-
-  case $sympa_lang {
-    '': { $sympa_lang = "en_US" }
-  }
+  # Sympa subsystems
+  include mail::web::sympa
+  include mail::packages::sympa
 
   #
   # Database configuration
   #
-  database::instance { "$sympa_database_name":
-    password   => "$sympa_database_password",
-    privileges => $lsbdistcodename ? {
+  database::instance { "${database_name}":
+    password   => "${database_password}",
+    privileges => $::lsbdistcodename ? {
       'lenny' => 'all',
       default => [ 'alter_priv', 'alter_routine_priv', 'create_priv',
                    'create_routine_priv', 'create_tmp_table_priv',
@@ -70,7 +62,7 @@ class mail::sympa {
     owner   => sympa,
     group   => sympa,
     mode    => 0640,
-    content => template("mail/sympa/sympa.conf.${lsbdistcodename}.erb"),
+    content => template("mail/sympa/sympa.conf.${::lsbdistcodename}.erb"),
     require => [ File['/etc/sympa'], User['sympa'] ],
     notify  => Service['apache', 'sympa'],
   }
@@ -87,7 +79,7 @@ class mail::sympa {
     owner   => root,
     group   => root,
     mode    => 0600,
-    content => template("mail/sympa/dbconfig-common.${lsbdistcodename}.erb"),
+    content => template("mail/sympa/dbconfig-common.${::lsbdistcodename}.erb"),
     require => File['/etc/dbconfig-common'],
   }
 
index 42444cae41a93bce5afef05545b54140e6aff8ee..8106b2b926cdaec9eb7471a330c851f54e4e76f5 100644 (file)
@@ -13,10 +13,7 @@ class mail::system {
   $postfix_manage_virtual_regexp   = "yes"
   $postfix_mydestination           = '$myhostname, localhost.$mydomain, localhost'
   $postfix_default_relay_domains   = '$mydestination'
-
-  case $postfix_mynetworks {
-    '': { $postfix_mynetworks = "127.0.0.0/8" }
-  }
+  $postfix_mynetworks              = hiera('postfix_mynetworks', "127.0.0.0/8")
 
   case $sympa_subdomain {
     '': { $sympa_subdomain = "lists" }
@@ -35,7 +32,7 @@ class mail::system {
   include mail::spamassassin
 
   # Virtual mail system
-  case $mail_virtual {
+  case hiera('mail_virtual', true) {
     true: {
       include mail::virtual
     }
@@ -45,10 +42,10 @@ class mail::system {
   }
 
   # Sympa mailing list manager
-  case $mail_sympa {
+  case hiera('mail_sympa', false) {
     true: {
-      $sympa_relay_domains = ", ${sympa_subdomain}.${domain}"
       include mail::sympa
+      $sympa_relay_domains = ", ${mail::sympa::subdomain}.${domain}"
     }
     'disabled': {
       include mail::sympa::disabled
@@ -58,41 +55,30 @@ class mail::system {
   }
 
   # Schleuder mailing list manager
-  case $mail_schleuder {
+  case hiera('mail_schleuder', false) {
     true: {
-      case $schleuder_subdomain {
-        '': { $schleuder_subdomain = "encrypted" }
-      }
-
-      $schleuder_relay_domains = ", ${schleuder_subdomain}.${domain}"
-      include mail::schleuder
+      class { 'mail::schleuder: }
+      $schleuder_relay_domains = ", ${mail::schleuder::subdomain}.${domain}"
     }
   }
 
   # Mlmmj
-  case $mail_mlmmj {
-    true: {
-      case $mlmmj_subdomain {
-        '': { $mlmmj_subdomain = "mlmmj" }
-      }
-
-      $mlmmj_relay_domains = ", ${mlmmj_subdomain}.${domain}"
-      include mail::mlmmj
+  case hiera('mail_mlmmj', false) {
+      class { 'mail::mlmmj': }
+      $mlmmj_relay_domains = ", ${mail::mlmmj::subdomain}.${domain}"
     }
   }
 
   # Firma
-  case $mail_firma {
+  case hiera('mail_firma', false) {
     true: {
-      case $firma_subdomain {
-        '': { $firma_subdomain = "firma" }
-      }
-
-      $firma_relay_domains = ", ${firma_subdomain}.${domain}"
-      include mail::firma
+      class { 'mail::firma': }
+      $firma_relay_domains = ", ${mail::firma::subdomain}.${domain}"
     }
   }
 
+  $postfix_relay_domains = hiera('postfix_relay_domains', '')
+
   case $postfix_relay_domains {
     '': { $postfix_relay_domains = "${postfix_default_relay_domains}${sympa_relay_domains}${schleuder_relay_domains}${mlmmj_relay_domains}${firma_relay_domains}" }
   }
index c8957774ebe4502fbed57fc3d5a3029c6c4cff0b..d351209f1db0f720864a82ff9a87c4042f18c777 100644 (file)
@@ -1,35 +1,11 @@
 class mail::virtual {
-  # Class configuration
-  case $postfixadmin_database_password {
-    '': { fail("You need to define \$postfixadmin_database_password host config") }
-  }
-
-  case $postfixadmin_setup_hash {
-    '': {
-      warning("You need to define \$postfixadmin_setup_hash host config")
-      $postfixadmin_setup_hash = 'changeme'
-    }
-  }
-
-  case $postfixadmin_database_user {
-    '': { $postfixadmin_database_user = "postfix" }
-  }
-
-  case $postfixadmin_database_host {
-    '': { $postfixadmin_database_host = "localhost" }
-  }
-
-  case $postfixadmin_database_name {
-    '': { $postfixadmin_database_name= "postfix" }
-  }
-
   # Virtual subsystems
   include database
   include mail::packages::virtual
   include mail::sasl
   include mail::dovecot
-  include mail::postfixadmin
-  include mail::web::virtual
+
+  class { [ 'mail::postfixadmin', 'mail::web::virtual' }
 
   # Virtual mailboxes
   file { '/var/mail/virtual':
index 2dab8e3ffae80e17b2dbc26e9d24f94ab73c99f2..16f4b25a8734eea658d1ac2ae29b8b6facfc2f02 100644 (file)
@@ -1,29 +1,43 @@
-class mail::web::virtual inherits websites::setup {
+class mail::web::virtual(
+  $database_user = hiera('postfixadmin_database_user', 'postfix'),
+  $database_host = hiera('postfixadmin_database_host', 'localhost'),
+  $database_name = hiera('postfixadmin_database_name', 'postfix'),
+  $database_password = hiera('postfixadmin_database_password', ''),
+  $postfixadmin_setup_hash = hiera('postfixadmin_setup_hash', ''),
+  $roundcube_des_key = hiera('roundcube_des_key', ''),
+  $roundcube_logo = hiera('roundcube_logo', 'null'),
+  $roundcube_login_info = hiera('roundcube_login_info', false)
+) {
+
   # Class configuration
-  if $lsbdistcodename != 'lenny' {
+  if $::lsbdistcodename != 'lenny' {
     case $roundcube_des_key {
-      '': { fail("You need to define \$roundcube_des_key host config") }
+      '': { fail("You need to define roundcube_des_key host config") }
     }
+  }
 
-    case $roundcube_logo {
-      '': { $roundcube_logo = 'null' }
-    }
+  case $database_password {
+    '': { fail("You need to define database_password host config") }
+  }
 
-    case $roundcube_login_info {
-      '': { $roundcube_login_info = false }
+  case $postfixadmin_setup_hash {
+    '': {
+      warning("You need to define postfixadmin_setup_hash host config")
+      $setup_hash = 'changeme'
     }
   }
 
   include php::imap
+  include websites::setup
 
   apache::site { "postfixadmin":
-    docroot => "${apache_sites_folder}/postfixadmin/site",
+    docroot => "${apache::sites_folder}/postfixadmin/site",
     use     => [ "Site postfixadmin" ],
     mpm     => false,
   }
 
   apache::site { "mail":
-    docroot => $lsbdistcodename ? {
+    docroot => $::lsbdistcodename ? {
       'lenny' => "/usr/share/squirrelmail",
       default => "/var/lib/roundcube",
     },
@@ -31,17 +45,17 @@ class mail::web::virtual inherits websites::setup {
     mpm     => false,
   }
 
-  file { "${apache_sites_folder}/postfixadmin/site/config.inc.php":
+  file { "${apache::sites_folder}/postfixadmin/site/config.inc.php":
     ensure  => present,
     owner   => www-data,
     group   => root,
     mode    => 0640,
     content => template('mail/postfixadmin/config.inc.php.erb'),
-    require => File["${apache_sites_folder}/postfixadmin/site"],
+    require => File["${apache::sites_folder}/postfixadmin/site"],
   }
 
   file { "/etc/roundcube/main.inc.php":
-    ensure => $lsbdistcodename ? {
+    ensure => $::lsbdistcodename ? {
       'lenny' => absent,
       default => present,
     },
@@ -53,7 +67,7 @@ class mail::web::virtual inherits websites::setup {
   }
 
   file { "/var/lib/roundcube/plugins/login_info":
-    ensure => $lsbdistcodename ? {
+    ensure => $::lsbdistcodename ? {
       'lenny' => absent,
       default => directory,
     },
@@ -67,8 +81,10 @@ class mail::web::virtual inherits websites::setup {
 }
 
 class mail::web::sympa inherits websites::setup {
+  $sympa_subdomain = hiera('sympa_subdomain', 'lists')
+
   apache::site { "$sympa_subdomain":
-    docroot => "${apache_www_folder}/${sympa_subdomain}",
+    docroot => "${apache::www_folder}/${sympa_subdomain}",
     source  => true,
     owner   => sympa,
     group   => sympa,
@@ -89,13 +105,13 @@ class mail::web::sympa inherits websites::setup {
     require => Package["apache2-suexec"],
   }
 
-  file { "${apache_www_folder}/${sympa_subdomain}/wwsympa.fcgi":
+  file { "${apache::www_folder}/${sympa_subdomain}/wwsympa.fcgi":
     ensure  => present,
     owner   => sympa,
     group   => sympa,
     mode    => 0550,
     content => "#!/bin/sh\n/usr/lib/cgi-bin/sympa/wwsympa.fcgi\n",
-    require => File["${apache_www_folder}/${sympa_subdomain}"],
+    require => File["${apache::www_folder}/${sympa_subdomain}"],
   }
 }
 
@@ -104,12 +120,14 @@ class mail::web::sympa::disabled inherits mail::web::sympa {
     ensure => absent,
   }
 
-  File["${apache_www_folder}/${sympa_subdomain}/wwsympa.fcgi"] {
+  File["${apache::www_folder}/${sympa_subdomain}/wwsympa.fcgi"] {
     require => undef,
   }
 }
 
 class mail::web::mlmmj inherits websites::setup {
+  $mlmmj_subdomain = hiera('mlmmj_subdomain')
+
   apache::site { "$mlmmj_subdomain":
     docroot     => "/usr/share/mlmmj-php-web-admin",
     owner       => 'mlmmj',
index 1ddb76cd4c04558a6aad0057c21306ed94d09bc4..2fc0df9f3a6478f1caa2a4235bcded6603efb826 100644 (file)
@@ -56,7 +56,7 @@ driver = mysql
 #   connect = /etc/dovecot/authdb.sqlite
 #
 #connect = dbname=virtual user=virtual
-connect = host=<%= postfixadmin_database_host %> dbname=<%= postfixadmin_database_name %> user=<%= postfixadmin_database_user %> password=<%= postfixadmin_database_password %>
+connect = host=<%= scope.lookupvar('postfixadmin::database_host') %> dbname=<%= scope.lookupvar('postfixadmin::database_name') %> user=<%= scope.lookupvar('postfixadmin::database_user') %> password=<%= scope.lookupvar('postfixadmin::database_password') %>
 
 # Default password scheme.
 #
index a15fc5a7d3c592c5992cfa68fa8c2f7ae320a6e4..27c65af09ccb63337435a9602d7d496b6d01947b 100644 (file)
@@ -1,2 +1,2 @@
-/^.*+request\@<%= firma_subdomain.gsub(/\./, '\.') %>\.(.*)$/ firmarequest:
-/^.*\@<%= firma_subdomain.gsub(/\./, '\.') %>\.(.*)$/       firma:
+/^.*+request\@<%= subdomain.gsub(/\./, '\.') %>\.(.*)$/ firmarequest:
+/^.*\@<%= subdomain.gsub(/\./, '\.') %>\.(.*)$/       firma:
index 7ba1b16d70a022e6052587f39610f4c2e2ff93eb..767f3c1c4c990d72f3972a1071809a7916a9fc3b 100644 (file)
@@ -1 +1 @@
-/^(.*)-request\@<%= firma_subdomain.gsub(/\./, '\.') %>\.(.*)$/    $1+request@<%= firma_subdomain %>.$2
+/^(.*)-request\@<%= subdomain.gsub(/\./, '\.') %>\.(.*)$/    $1+request@<%= subdomain %>.$2
index 77811ddf8072744dc5d3f321ab36893e18a1d756..57f1a72710843cf9e9b49b18c066f91cc87a1e64 100644 (file)
@@ -1 +1 @@
-/^(.*)\@<%= mlmmj_subdomain.gsub(/\./, '\.') %>\.(.*)$/                    ${1}
+/^(.*)\@<%= subdomain.gsub(/\./, '\.') %>\.(.*)$/                    ${1}
index 9fa4867ba96d26fc576a596e0ab585c85bd4718b..dd41a619a5ddd8963642255e8bdd44dae3cd6187 100644 (file)
@@ -1,5 +1,5 @@
-user      = <%= postfixadmin_database_user %>
-password  = <%= postfixadmin_database_password %>
-hosts     = <%= postfixadmin_database_host %>
-dbname    = <%= postfixadmin_database_name %>
+user      = <%= database_user %>
+password  = <%= database_password %>
+hosts     = <%= database_host %>
+dbname    = <%= database_name %>
 query     = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = CONCAT('@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1'
index b7aabf2e4441cbf1d9eb3b01ef15ccd451ce3eef..c148372b2bf471accfd8c877a17d7479afdf0dec 100644 (file)
@@ -1,5 +1,5 @@
-user      = <%= postfixadmin_database_user %>
-password  = <%= postfixadmin_database_password %>
-hosts     = <%= postfixadmin_database_host %>
-dbname    = <%= postfixadmin_database_name %>
+user      = <%= database_user %>
+password  = <%= database_password %>
+hosts     = <%= database_host %>
+dbname    = <%= database_name %>
 query     = SELECT maildir FROM mailbox,alias_domain WHERE alias_domain.alias_domain = '%d' and mailbox.username = CONCAT('%u', '@', alias_domain.target_domain) AND mailbox.active = 1 AND alias_domain.active='1'
index ac120c005cf4f35f522109f2e5f0307b978c6a92..fddfe91deb6630a7f662da5224d9d8d432f7ddf6 100644 (file)
@@ -1,5 +1,5 @@
-user      = <%= postfixadmin_database_user %>
-password  = <%= postfixadmin_database_password %>
-hosts     = <%= postfixadmin_database_host %>
-dbname    = <%= postfixadmin_database_name %>
+user      = <%= database_user %>
+password  = <%= database_password %>
+hosts     = <%= database_host %>
+dbname    = <%= database_name %>
 query     = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = CONCAT('%u', '@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1'
index f80c6fcf2cfe97ea67d6e6ec802b8ecc3af82d41..d4b7164bc62bc0c347460f067fa96068f62c045d 100644 (file)
@@ -1,6 +1,6 @@
-user      = <%= postfixadmin_database_user %>
-password  = <%= postfixadmin_database_password %>
-hosts     = <%= postfixadmin_database_host %>
-dbname    = <%= postfixadmin_database_name %>
+user      = <%= database_user %>
+password  = <%= database_password %>
+hosts     = <%= database_host %>
+dbname    = <%= database_name %>
 query     = SELECT goto FROM alias WHERE address='%s' AND active = '1'
 #expansion_limit = 100
index 0706f4b75eef5ad8cabb50d32be92164f3fd04e5..ecf253e907a2f5d39917b3b9ef1209083e2e2d60 100644 (file)
@@ -1,7 +1,7 @@
-user      = <%= postfixadmin_database_user %>
-password  = <%= postfixadmin_database_password %>
-hosts     = <%= postfixadmin_database_host %>
-dbname    = <%= postfixadmin_database_name %>
+user      = <%= database_user %>
+password  = <%= database_password %>
+hosts     = <%= database_host %>
+dbname    = <%= database_name %>
 query     = SELECT domain FROM domain WHERE domain='%s' AND active = '1'
 #query    = SELECT domain FROM domain WHERE domain='%s'
 #optional query to use when relaying for backup MX
index 61804f375173ce31db68bd33d36f168c93e8a52f..b40ce8fdb162293f191079f5d39793d4474d03b6 100644 (file)
@@ -1,5 +1,5 @@
-user      = <%= postfixadmin_database_user %>
-password  = <%= postfixadmin_database_password %>
-hosts     = <%= postfixadmin_database_host %>
-dbname    = <%= postfixadmin_database_name %>
+user      = <%= database_user %>
+password  = <%= database_password %>
+hosts     = <%= database_host %>
+dbname    = <%= database_name %>
 query     = SELECT quota FROM mailbox WHERE username='%s' AND active = '1'
index f52049b285f785238fdfb0ec56ff2a7cde95948b..4e4b54e43b9997eab0a4b99898e45d5d020a908c 100644 (file)
@@ -1,6 +1,6 @@
-user      = <%= postfixadmin_database_user %>
-password  = <%= postfixadmin_database_password %>
-hosts     = <%= postfixadmin_database_host %>
-dbname    = <%= postfixadmin_database_name %>
+user      = <%= database_user %>
+password  = <%= database_password %>
+hosts     = <%= database_host %>
+dbname    = <%= database_name %>
 query     = SELECT maildir FROM mailbox WHERE username='%s' AND active = '1'
 #expansion_limit = 100
index a7885f738f80a035b834f70c0ae8f48eb9c31cb6..1e32e2a050a226c301cbd3aa7628991188008e6e 100644 (file)
@@ -1,2 +1,2 @@
-/^.*+owner\@<%= sympa_subdomain.gsub(/\./, '\.') %>\.(.*)$/ sympabounce:
-/^.*\@<%= sympa_subdomain.gsub(/\./, '\.') %>\.(.*)$/       sympa:
+/^.*+owner\@<%= subdomain.gsub(/\./, '\.') %>\.(.*)$/ sympabounce:
+/^.*\@<%= subdomain.gsub(/\./, '\.') %>\.(.*)$/       sympa:
index a2ab261e3311f66bf166b6ece5a121718c162fef..f5883d7c8ae7b39d8c6047463d76b119d2db704a 100644 (file)
@@ -1 +1 @@
-/^(.*)-owner\@<%= sympa_subdomain.gsub(/\./, '\.') %>\.(.*)$/    $1+owner@<%= sympa_subdomain %>.$2
+/^(.*)-owner\@<%= subdomain.gsub(/\./, '\.') %>\.(.*)$/    $1+owner@<%= subdomain %>.$2
index 8c4b8cf1f316dd084b348d4056dce2e5b0e7061b..404dcb32c7ac8be6cbcc3233ca4d1537b5017b70 100644 (file)
@@ -47,10 +47,10 @@ $CONF['default_language'] = 'en';
 // mysqli = MySQL 4.1+ 
 // pgsql = PostgreSQL
 $CONF['database_type'] = 'mysql';
-$CONF['database_host'] = '<%= postfixadmin_database_host %>';
-$CONF['database_user'] = '<%= postfixadmin_database_user %>';
-$CONF['database_password'] = '<%= postfixadmin_database_password %>';
-$CONF['database_name'] = '<%= postfixadmin_database_name %>';
+$CONF['database_host'] = '<%= database_host %>';
+$CONF['database_user'] = '<%= database_user %>';
+$CONF['database_password'] = '<%= database_password %>';
+$CONF['database_name'] = '<%= database_name %>';
 $CONF['database_prefix'] = '';
 // If you need to specify a different port for a MYSQL database connection, use e.g.
 //   $CONF['database_host'] = '172.30.33.66:3308';
index 89aa0a21d90d116e943523da1af825d69b9fe527..91a9c97ecac477a1b950de38d0c7791888759dc4 100644 (file)
@@ -24,17 +24,17 @@ dbc_dbtype='mysql'
 
 # dbc_dbuser: database user
 #      the name of the user who we will use to connect to the database.
-dbc_dbuser='<%= sympa_database_name %>'
+dbc_dbuser='<%= database_name %>'
 
 # dbc_dbpass: database user password
 #      the password to use with the above username when connecting
 #      to a database, if one is required
-dbc_dbpass='<%= sympa_database_password %>'
+dbc_dbpass='<%= database_password %>'
 
 # dbc_dbserver: database host.  
 #      leave unset to use localhost (or a more efficient local method
 #      if it exists).
-dbc_dbserver='<%= sympa_database_host %>'
+dbc_dbserver='<%= database_host %>'
 
 # dbc_dbport: remote database port
 #      leave unset to use the default.  only applicable if you are
@@ -43,7 +43,7 @@ dbc_dbport=''
 
 # dbc_dbname: name of database
 #      this is the name of your application's database.
-dbc_dbname='<%= sympa_database_name %>'
+dbc_dbname='<%= database_name %>'
 
 # dbc_dbadmin: name of the administrative user
 #      this is the administrative user that is used to create all of the above
index 6ae9fbdd9b6909b3bbfbec37d87e8fe0c4f4e036..77406832d28d0fdc3e7517b305c3325013f3b0eb 100644 (file)
@@ -49,18 +49,18 @@ log_level   0
 ###\\\\ General definition ////###
 
 ## Main robot hostname
-domain         <%= sympa_subdomain %>.<%= domain %>
+domain         <%= subdomain %>.<%= domain %>
 
 ## Listmasters email list comma separated
 ## Sympa will associate listmaster privileges to these email addresses (mail and web interfaces). Some error reports may also be sent to these addresses.
-listmaster             <%= sympa_listmasters %>
+listmaster             <%= listmasters %>
 
 ## Local part of sympa email adresse
 ## Effective address will be [EMAIL]@[HOST]
 email  sympa
 
 ## Default lang (cs | de | el | en_US | fr | hu | it | ja_JP | nl | oc | pt_BR | tr)
-lang           <%= sympa_lang %>
+lang           <%= lang %>
 
 ## Who is able to create lists
 ## This parameter is a scenario, check sympa documentation about scenarios if you want to define one
@@ -140,17 +140,17 @@ db_type   mysql
 
 ## Name of the database
 ## with SQLite, the name of the DB corresponds to the DB file
-db_name        <%= sympa_database_name %>
+db_name        <%= database_name %>
 
 ## The host hosting your sympa database
-db_host        <%= sympa_database_host %>
+db_host        <%= database_host %>
 
 ## Database user for connexion
-db_user        <%= sympa_database_name %>
+db_user        <%= database_name %>
 
 ## Database password (associated to the db_user)
 ## What ever you use a password or not, you must protect the SQL server (is it a not a public internet service ?)
-db_passwd      <%= sympa_database_password %>
+db_passwd      <%= database_password %>
 
 ## Database private extention to user table
 ## You need to extend the database format with these fields
@@ -163,15 +163,15 @@ db_passwd <%= sympa_database_password %>
 ###\\\\ Web interface ////###
 
 ## Sympa's main page URL
-wwsympa_url    https://<%= sympa_subdomain %>.<%= domain %>/wws
+wwurl  https://<%= subdomain %>.<%= domain %>/wws
 
 ## SOAP service URL
-soap_url       https://<%= sympa_subdomain %>.<%= domain %>/sympasoap
+soap_url       https://<%= subdomain %>.<%= domain %>/sympasoap
 
 ## Supported languages for the user interface
 supported_lang en_US,pt_BR
 
-<%- unless sympa_logo_html_definition.to_s.empty? then -%>
+<%- unless logo_html_definition.to_s.empty? then -%>
 ## Logo
-logo_html_definition <%= sympa_logo_html_definition %>
+logo_html_definition <%= logo_html_definition %>
 <%- end %>
index ff3aba4675b636b2931374340d87f22229e1506d..29c29d265875ccaf598c5f10d3bb6a860be6bef4 100644 (file)
@@ -49,18 +49,18 @@ log_level   0
 ###\\\\ General definition ////###
 
 ## Main robot hostname
-domain         <%= sympa_subdomain %>.<%= domain %>
+domain         <%= subdomain %>.<%= domain %>
 
 ## Listmasters email list comma separated
 ## Sympa will associate listmaster privileges to these email addresses (mail and web interfaces). Some error reports may also be sent to these addresses.
-listmaster             <%= sympa_listmasters %>
+listmaster             <%= listmasters %>
 
 ## Local part of sympa email adresse
 ## Effective address will be [EMAIL]@[HOST]
 email  sympa
 
 ## Default lang (cs | de | el | en_US | fr | hu | it | ja_JP | nl | oc | pt_BR | tr)
-lang           <%= sympa_lang %>
+lang           <%= lang %>
 
 ## Who is able to create lists
 ## This parameter is a scenario, check sympa documentation about scenarios if you want to define one
@@ -140,17 +140,17 @@ db_type   mysql
 
 ## Name of the database
 ## with SQLite, the name of the DB corresponds to the DB file
-db_name        <%= sympa_database_name %>
+db_name        <%= database_name %>
 
 ## The host hosting your sympa database
-db_host        <%= sympa_database_host %>
+db_host        <%= database_host %>
 
 ## Database user for connexion
-db_user        <%= sympa_database_name %>
+db_user        <%= database_name %>
 
 ## Database password (associated to the db_user)
 ## What ever you use a password or not, you must protect the SQL server (is it a not a public internet service ?)
-db_passwd      <%= sympa_database_password %>
+db_passwd      <%= database_password %>
 
 ## Database private extention to user table
 ## You need to extend the database format with these fields
@@ -163,10 +163,10 @@ db_passwd <%= sympa_database_password %>
 ###\\\\ Web interface ////###
 
 ## Sympa's main page URL
-wwsympa_url    https://<%= sympa_subdomain %>.<%= domain %>/wws
+wwurl  https://<%= subdomain %>.<%= domain %>/wws
 
 ## SOAP service URL
-soap_url       https://<%= sympa_subdomain %>.<%= domain %>/sympasoap
+soap_url       https://<%= subdomain %>.<%= domain %>/sympasoap
 
 ## Supported languages for the user interface
 supported_lang en_US,pt_BR
@@ -177,7 +177,7 @@ bounce_halt_rate 50
 bounce_warn_rate 30
 bounce_halt_rate 50
 
-<%- unless sympa_logo_html_definition.to_s.empty? then -%>
+<%- unless logo_html_definition.to_s.empty? then -%>
 ## Logo
-logo_html_definition <%= sympa_logo_html_definition %>
+logo_html_definition <%= logo_html_definition %>
 <%- end %>