diff options
Diffstat (limited to 'manifests/postfixadmin.pp')
-rw-r--r-- | manifests/postfixadmin.pp | 34 |
1 files changed, 28 insertions, 6 deletions
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, |