diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-01-21 18:01:00 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-01-21 18:01:00 -0200 |
commit | 86515e9a0f27d36e38faee05beb03cbb99677e73 (patch) | |
tree | 355b620ee9ea98be6d54f87c506b64b2024c8076 | |
parent | 14d954ff02564493192fe1fc9ad3a148ba20ef60 (diff) | |
download | puppet-mail-86515e9a0f27d36e38faee05beb03cbb99677e73.tar.gz puppet-mail-86515e9a0f27d36e38faee05beb03cbb99677e73.tar.bz2 |
Refactoring for 2.7 compatibility
29 files changed, 176 insertions, 185 deletions
diff --git a/manifests/amavisd.pp b/manifests/amavisd.pp index 7d15804..12accfa 100644 --- a/manifests/amavisd.pp +++ b/manifests/amavisd.pp @@ -41,7 +41,7 @@ class mail::amavisd { notify => Service['amavis'], } - case $lsbdistcodename { + case $::lsbdistcodename { 'lenny': { } default: { file { "/etc/amavis/conf.d/05-node_id": diff --git a/manifests/base.pp b/manifests/base.pp index f4bb97f..c6dd4af 100644 --- a/manifests/base.pp +++ b/manifests/base.pp @@ -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', } diff --git a/manifests/dovecot.pp b/manifests/dovecot.pp index c054678..c4f7b4b 100644 --- a/manifests/dovecot.pp +++ b/manifests/dovecot.pp @@ -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'], } diff --git a/manifests/firma.pp b/manifests/firma.pp index c1ab5a9..ec59879 100644 --- a/manifests/firma.pp +++ b/manifests/firma.pp @@ -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", } diff --git a/manifests/mlmmj.pp b/manifests/mlmmj.pp index 9db4356..6c58b79 100644 --- a/manifests/mlmmj.pp +++ b/manifests/mlmmj.pp @@ -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, } } diff --git a/manifests/packages.pp b/manifests/packages.pp index 548b833..2e3649d 100644 --- a/manifests/packages.pp +++ b/manifests/packages.pp @@ -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, } diff --git a/manifests/postfixadmin.pp b/manifests/postfixadmin.pp index 07d555b..3ab50e4 100644 --- a/manifests/postfixadmin.pp +++ b/manifests/postfixadmin.pp @@ -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}", } # diff --git a/manifests/schleuder.pp b/manifests/schleuder.pp index b9c502e..1f42fcd 100644 --- a/manifests/schleuder.pp +++ b/manifests/schleuder.pp @@ -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", } diff --git a/manifests/sympa.pp b/manifests/sympa.pp index 5b042d5..0ba7841 100644 --- a/manifests/sympa.pp +++ b/manifests/sympa.pp @@ -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'], } diff --git a/manifests/system.pp b/manifests/system.pp index 42444ca..8106b2b 100644 --- a/manifests/system.pp +++ b/manifests/system.pp @@ -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}" } } diff --git a/manifests/virtual.pp b/manifests/virtual.pp index c895777..d351209 100644 --- a/manifests/virtual.pp +++ b/manifests/virtual.pp @@ -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': diff --git a/manifests/web.pp b/manifests/web.pp index 2dab8e3..16f4b25 100644 --- a/manifests/web.pp +++ b/manifests/web.pp @@ -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', diff --git a/templates/dovecot/dovecot-sql.conf.erb b/templates/dovecot/dovecot-sql.conf.erb index 1ddb76c..2fc0df9 100644 --- a/templates/dovecot/dovecot-sql.conf.erb +++ b/templates/dovecot/dovecot-sql.conf.erb @@ -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. # diff --git a/templates/postfix/firma/transport_regexp.erb b/templates/postfix/firma/transport_regexp.erb index a15fc5a..27c65af 100644 --- a/templates/postfix/firma/transport_regexp.erb +++ b/templates/postfix/firma/transport_regexp.erb @@ -1,2 +1,2 @@ -/^.*+request\@<%= firma_subdomain.gsub(/\./, '\.') %>\.(.*)$/ firmarequest: -/^.*\@<%= firma_subdomain.gsub(/\./, '\.') %>\.(.*)$/ firma: +/^.*+request\@<%= subdomain.gsub(/\./, '\.') %>\.(.*)$/ firmarequest: +/^.*\@<%= subdomain.gsub(/\./, '\.') %>\.(.*)$/ firma: diff --git a/templates/postfix/firma/virtual_regexp.erb b/templates/postfix/firma/virtual_regexp.erb index 7ba1b16..767f3c1 100644 --- a/templates/postfix/firma/virtual_regexp.erb +++ b/templates/postfix/firma/virtual_regexp.erb @@ -1 +1 @@ -/^(.*)-request\@<%= firma_subdomain.gsub(/\./, '\.') %>\.(.*)$/ $1+request@<%= firma_subdomain %>.$2 +/^(.*)-request\@<%= subdomain.gsub(/\./, '\.') %>\.(.*)$/ $1+request@<%= subdomain %>.$2 diff --git a/templates/postfix/mlmmj/virtual_regexp.erb b/templates/postfix/mlmmj/virtual_regexp.erb index 77811dd..57f1a72 100644 --- a/templates/postfix/mlmmj/virtual_regexp.erb +++ b/templates/postfix/mlmmj/virtual_regexp.erb @@ -1 +1 @@ -/^(.*)\@<%= mlmmj_subdomain.gsub(/\./, '\.') %>\.(.*)$/ ${1} +/^(.*)\@<%= subdomain.gsub(/\./, '\.') %>\.(.*)$/ ${1} diff --git a/templates/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf.erb b/templates/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf.erb index 9fa4867..dd41a61 100644 --- a/templates/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf.erb +++ b/templates/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf.erb @@ -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' diff --git a/templates/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf.erb b/templates/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf.erb index b7aabf2..c148372 100644 --- a/templates/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf.erb +++ b/templates/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf.erb @@ -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' diff --git a/templates/postfix/sql/mysql_virtual_alias_domain_maps.cf.erb b/templates/postfix/sql/mysql_virtual_alias_domain_maps.cf.erb index ac120c0..fddfe91 100644 --- a/templates/postfix/sql/mysql_virtual_alias_domain_maps.cf.erb +++ b/templates/postfix/sql/mysql_virtual_alias_domain_maps.cf.erb @@ -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' diff --git a/templates/postfix/sql/mysql_virtual_alias_maps.cf.erb b/templates/postfix/sql/mysql_virtual_alias_maps.cf.erb index f80c6fc..d4b7164 100644 --- a/templates/postfix/sql/mysql_virtual_alias_maps.cf.erb +++ b/templates/postfix/sql/mysql_virtual_alias_maps.cf.erb @@ -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 diff --git a/templates/postfix/sql/mysql_virtual_domains_maps.cf.erb b/templates/postfix/sql/mysql_virtual_domains_maps.cf.erb index 0706f4b..ecf253e 100644 --- a/templates/postfix/sql/mysql_virtual_domains_maps.cf.erb +++ b/templates/postfix/sql/mysql_virtual_domains_maps.cf.erb @@ -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 diff --git a/templates/postfix/sql/mysql_virtual_mailbox_limit_maps.cf.erb b/templates/postfix/sql/mysql_virtual_mailbox_limit_maps.cf.erb index 61804f3..b40ce8f 100644 --- a/templates/postfix/sql/mysql_virtual_mailbox_limit_maps.cf.erb +++ b/templates/postfix/sql/mysql_virtual_mailbox_limit_maps.cf.erb @@ -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' diff --git a/templates/postfix/sql/mysql_virtual_mailbox_maps.cf.erb b/templates/postfix/sql/mysql_virtual_mailbox_maps.cf.erb index f52049b..4e4b54e 100644 --- a/templates/postfix/sql/mysql_virtual_mailbox_maps.cf.erb +++ b/templates/postfix/sql/mysql_virtual_mailbox_maps.cf.erb @@ -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 diff --git a/templates/postfix/sympa/transport_regexp.erb b/templates/postfix/sympa/transport_regexp.erb index a7885f7..1e32e2a 100644 --- a/templates/postfix/sympa/transport_regexp.erb +++ b/templates/postfix/sympa/transport_regexp.erb @@ -1,2 +1,2 @@ -/^.*+owner\@<%= sympa_subdomain.gsub(/\./, '\.') %>\.(.*)$/ sympabounce: -/^.*\@<%= sympa_subdomain.gsub(/\./, '\.') %>\.(.*)$/ sympa: +/^.*+owner\@<%= subdomain.gsub(/\./, '\.') %>\.(.*)$/ sympabounce: +/^.*\@<%= subdomain.gsub(/\./, '\.') %>\.(.*)$/ sympa: diff --git a/templates/postfix/sympa/virtual_regexp.erb b/templates/postfix/sympa/virtual_regexp.erb index a2ab261..f5883d7 100644 --- a/templates/postfix/sympa/virtual_regexp.erb +++ b/templates/postfix/sympa/virtual_regexp.erb @@ -1 +1 @@ -/^(.*)-owner\@<%= sympa_subdomain.gsub(/\./, '\.') %>\.(.*)$/ $1+owner@<%= sympa_subdomain %>.$2 +/^(.*)-owner\@<%= subdomain.gsub(/\./, '\.') %>\.(.*)$/ $1+owner@<%= subdomain %>.$2 diff --git a/templates/postfixadmin/config.inc.php.erb b/templates/postfixadmin/config.inc.php.erb index 8c4b8cf..404dcb3 100644 --- a/templates/postfixadmin/config.inc.php.erb +++ b/templates/postfixadmin/config.inc.php.erb @@ -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'; diff --git a/templates/sympa/dbconfig-common.squeeze.erb b/templates/sympa/dbconfig-common.squeeze.erb index 89aa0a2..91a9c97 100644 --- a/templates/sympa/dbconfig-common.squeeze.erb +++ b/templates/sympa/dbconfig-common.squeeze.erb @@ -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 diff --git a/templates/sympa/sympa.conf.lenny.erb b/templates/sympa/sympa.conf.lenny.erb index 6ae9fbd..7740683 100644 --- a/templates/sympa/sympa.conf.lenny.erb +++ b/templates/sympa/sympa.conf.lenny.erb @@ -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 %> diff --git a/templates/sympa/sympa.conf.squeeze.erb b/templates/sympa/sympa.conf.squeeze.erb index ff3aba4..29c29d2 100644 --- a/templates/sympa/sympa.conf.squeeze.erb +++ b/templates/sympa/sympa.conf.squeeze.erb @@ -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 %> |