class mail::postfixadmin { # # Database configuration # database::instance { "$postfixadmin_database_name": password => "$postfixadmin_database_password", } # # 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'], } 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' ], } # # Map files # file { "/etc/postfix/sql": ensure => directory, owner => postfix, group => root, mode => 0755, } file { "/etc/postfix/sql/mysql_virtual_domains_maps.cf": ensure => present, owner => postfix, mode => 0600, content => template('mail/postfix/sql/mysql_virtual_domains_maps.cf.erb'), require => File['/etc/postfix/sql'], } file { "/etc/postfix/sql/mysql_virtual_alias_maps.cf": ensure => present, owner => postfix, mode => 0600, content => template('mail/postfix/sql/mysql_virtual_alias_maps.cf.erb'), require => File['/etc/postfix/sql'], } file { "/etc/postfix/sql/mysql_virtual_alias_domain_maps.cf": ensure => present, owner => postfix, mode => 0600, content => template('mail/postfix/sql/mysql_virtual_alias_domain_maps.cf.erb'), require => File['/etc/postfix/sql'], } file { "/etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf": ensure => present, owner => postfix, mode => 0600, content => template('mail/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf.erb'), require => File['/etc/postfix/sql'], } file { "/etc/postfix/sql/mysql_virtual_mailbox_maps.cf": ensure => present, owner => postfix, mode => 0600, content => template('mail/postfix/sql/mysql_virtual_mailbox_maps.cf.erb'), require => File['/etc/postfix/sql'], } file { "/etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf": ensure => present, owner => postfix, mode => 0600, content => template('mail/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf.erb'), require => File['/etc/postfix/sql'], } # # 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/mysql_virtual_mailbox_limit_maps.cf": # ensure => present, # owner => postfix, # mode => 0600, # content => template('mail/postfix/sql/mysql_virtual_mailbox_limit_maps.cf.erb'), # require => File['/etc/postfix/sql'], #} }