From c783c4c439aa029f669eeff80788149a9dbe67fa Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 5 Aug 2010 18:41:09 -0300 Subject: Postfixadmin and dovecot configuration --- manifests/postfixadmin.pp | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) (limited to 'manifests/postfixadmin.pp') diff --git a/manifests/postfixadmin.pp b/manifests/postfixadmin.pp index 3d63f1e..f265385 100644 --- a/manifests/postfixadmin.pp +++ b/manifests/postfixadmin.pp @@ -1,11 +1,30 @@ class mail::postfixadmin { - # TODO - # $postfixadmin_user - # $postfixadmin_password - # $postfixadmin_hosts - # $postfixadmin_dbname + # + # Database configuration + # + case $postfixadmin_password { + '': { fail("You need to define \$postfixadmin_password host config") } + } + + case $postfixadmin_user { + '': { $postfixadmin_user = "postfix" } + } + + case $postfixadmin_hosts { + '': { $postfixadmin_hosts = "localhost" } + } + + case $postfixadmin_dbname { + '': { $postfixadmin_dbname= "postfix" } + } + + database::instance { "$postfixadmin_dbname": + password => "$postfixadmin_password", + } - # Postfixadmin + # + # Postfix configuration + # postfix::config { "virtual_mailbox_domains": value => 'proxy:mysql:/etc/postfix/sql/mysql_virtual_domains_maps.cf', require => File['/etc/postfix/sql/mysql_virtual_domains_maps.cf'], @@ -36,6 +55,9 @@ class mail::postfixadmin { postfix::config { "virtual_maildir_limit_message": value => 'The user's maildir has overdrawn his quota, try again later.' } postfix::config { "virtual_overquota_bounce": value => 'yes' } + # + # Map files + # file { "/etc/postfix/sql/mysql_virtual_domains_maps.cf": ensure => present, owner => root, -- cgit v1.2.3