summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-08-05 18:41:09 -0300
committerSilvio Rhatto <rhatto@riseup.net>2010-08-05 18:41:09 -0300
commitc783c4c439aa029f669eeff80788149a9dbe67fa (patch)
tree012ac94bf1a670cd9efc5b7205f7ffa5a581c80b /manifests
parentdad5888cea24eb71cb58d0a260a208ba6e2d8073 (diff)
downloadpuppet-mail-c783c4c439aa029f669eeff80788149a9dbe67fa.tar.gz
puppet-mail-c783c4c439aa029f669eeff80788149a9dbe67fa.tar.bz2
Postfixadmin and dovecot configuration
Diffstat (limited to 'manifests')
-rw-r--r--manifests/dovecot.pp12
-rw-r--r--manifests/postfixadmin.pp34
2 files changed, 35 insertions, 11 deletions
diff --git a/manifests/dovecot.pp b/manifests/dovecot.pp
index 4f9a226..2fda2fc 100644
--- a/manifests/dovecot.pp
+++ b/manifests/dovecot.pp
@@ -8,16 +8,18 @@ class mail::dovecot {
file { "/etc/dovecot/dovecot.conf":
ensure => present,
owner => root,
+ group => root,
mode => 0644,
source => "puppet://$server/modules/mail/dovecot/dovecot.conf",
notify => Service['dovecot'],
}
file { "/etc/dovecot/dovecot-sql.conf":
- ensure => present,
- owner => root,
- mode => 0600,
- source => "puppet://$server/modules/mail/dovecot/dovecot-sql.conf",
- notify => Service['dovecot'],
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => 0600,
+ content => template('dovecot/dovecot-sql.conf.erb'),
+ notify => Service['dovecot'],
}
}
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,