From dad5888cea24eb71cb58d0a260a208ba6e2d8073 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 4 Aug 2010 22:43:58 -0300 Subject: Initial import --- manifests/postfixadmin.pp | 87 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 manifests/postfixadmin.pp (limited to 'manifests/postfixadmin.pp') diff --git a/manifests/postfixadmin.pp b/manifests/postfixadmin.pp new file mode 100644 index 0000000..3d63f1e --- /dev/null +++ b/manifests/postfixadmin.pp @@ -0,0 +1,87 @@ +class mail::postfixadmin { + # TODO + # $postfixadmin_user + # $postfixadmin_password + # $postfixadmin_hosts + # $postfixadmin_dbname + + # Postfixadmin + 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'], + } + + postfix::config { "virtual_alias_maps": + value => 'hash:/etc/postfix/virtual, proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf, proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_maps.cf, proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf' + require => File['/etc/postfix/sql/mysql_virtual_alias_maps.cf', + '/etc/postfix/sql/mysql_virtual_alias_domain_maps.cf', + '/etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf' ], + } + + postfix::config { "virtual_mailbox_maps": + value => 'proxy:mysql:/etc/postfix/sql/mysql_virtual_mailbox_maps.cf, proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf', + require => File['/etc/postfix/sql/mysql_virtual_mailbox_maps.cf', + '/etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf' ], + } + + # Additional for quota support + postfix::config { "virtual_mailbox_limit_maps": + value => 'mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf' + require => File['/etc/postfix/mysql_virtual_mailbox_limit_maps.cf'], + } + + postfix::config { "virtual_create_maildirsize": value => 'yes' } + postfix::config { "virtual_mailbox_extended ": value => 'yes' } + postfix::config { "virtual_mailbox_limit_override": value => 'yes' } + 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' } + + file { "/etc/postfix/sql/mysql_virtual_domains_maps.cf": + ensure => present, + owner => root, + mode => 0600, + content => template('postfix/sql/mysql_virtual_domains_maps.cf.erb'), + } + + file { "/etc/postfix/sql/mysql_virtual_alias_maps.cf": + ensure => present, + owner => root, + mode => 0600, + content => template('postfix/sql/mysql_virtual_alias_maps.cf.erb'), + } + + file { "/etc/postfix/sql/mysql_virtual_alias_domain_maps.cf": + ensure => present, + owner => root, + mode => 0600, + content => template('postfix/sql/mysql_virtual_alias_domain_maps.cf'), + } + + file { "/etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf": + ensure => present, + owner => root, + mode => 0600, + content => template('postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf'), + } + + file { "/etc/postfix/sql/mysql_virtual_mailbox_maps.cf": + ensure => present, + owner => root, + mode => 0600, + content => template('postfix/sql/mysql_virtual_mailbox_maps.cf'), + } + + file { "/etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf": + ensure => present, + owner => root, + mode => 0600, + content => template('postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf'), + } + + file { "/etc/postfix/mysql_virtual_mailbox_limit_maps.cf": + ensure => present, + owner => root, + mode => 0600, + content => template('postfix/sql/mysql_virtual_mailbox_limit_maps.cf'), + } +} -- cgit v1.2.3