summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-08-15 13:40:41 -0300
committerSilvio Rhatto <rhatto@riseup.net>2010-08-15 13:40:41 -0300
commit2a99530fd499534282de62737f72ce1ef6b106c9 (patch)
tree3cf8896833993ef547a3cb0bead4b2f74c0e20f0 /manifests
parent35b2c40b791bcbc355c84502aba7e588f8c4bad5 (diff)
downloadpuppet-mail-2a99530fd499534282de62737f72ce1ef6b106c9.tar.gz
puppet-mail-2a99530fd499534282de62737f72ce1ef6b106c9.tar.bz2
Adding schleuder package class, imp4 package and mail::base class
Diffstat (limited to 'manifests')
-rw-r--r--manifests/base.pp53
-rw-r--r--manifests/init.pp1
-rw-r--r--manifests/packages.pp8
-rw-r--r--manifests/system.pp58
4 files changed, 68 insertions, 52 deletions
diff --git a/manifests/base.pp b/manifests/base.pp
new file mode 100644
index 0000000..972fa10
--- /dev/null
+++ b/manifests/base.pp
@@ -0,0 +1,53 @@
+class mail::base {
+ # Postfix configuration
+ postfix::config {
+ "mydomain": value => "$domain";
+ "myhostname": value => "$fqdn";
+ "mydestination": value => "$postfix_mydestination";
+ "mynetworks": value => "$postfix_mynetworks";
+ "relay_domains": value => '$mydestination';
+ "transport_maps": value => "hash:/etc/postfix/transport";
+ "mailbox_command": value => '/usr/bin/maildrop -d ${USER}';
+ "virtual_mailbox_base": value => '/var/mail/virtual';
+ "virtual_uid_maps": value => 'static:5000';
+ "virtual_gid_maps": value => 'static:5000';
+ "virtual_transport": value => 'dovecot';
+ "dovecot_destination_recipient_limit": value => '1';
+ "recipient_delimiter": value => '+';
+ }
+
+ postfix::hash { "/etc/postfix/virtual":
+ ensure => present,
+ }
+
+ postfix::hash { "/etc/postfix/transport":
+ ensure => present,
+ }
+
+ # Recipient restrictions
+ postfix::config { "smtpd_recipient_restrictions":
+ value => 'permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_rbl_client psbl.surriel.com, check_policy_service inet:127.0.0.1:60000' }
+
+ # Virtual mailboxes
+ file { '/var/mail/virtual':
+ ensure => directory,
+ owner => vmail,
+ group => vmail,
+ mode => 0750,
+ require => User['vmail'],
+ }
+
+ group { "vmail":
+ ensure => present,
+ gid => 5000,
+ }
+
+ user { "vmail":
+ ensure => present,
+ uid => 5000,
+ gid => "vmail",
+ password => "*",
+ home => '/var/mail/virtual',
+ require => Group['vmail'],
+ }
+}
diff --git a/manifests/init.pp b/manifests/init.pp
index 74abb21..bed6e69 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -12,3 +12,4 @@ import "tls.pp"
import "amavisd.pp"
import "web.pp"
import "sympa.pp"
+import "base.pp"
diff --git a/manifests/packages.pp b/manifests/packages.pp
index 661bdc8..ec52009 100644
--- a/manifests/packages.pp
+++ b/manifests/packages.pp
@@ -12,7 +12,7 @@ class mail::packages {
ensure => installed,
}
- package { [ 'squirrelmail', 'squirrelmail-locales' ]:
+ package { [ 'squirrelmail', 'squirrelmail-locales', 'imp4' ]:
ensure => installed,
}
@@ -27,3 +27,9 @@ class mail::packages::sympa {
ensure => installed,
}
}
+
+class mail::packages::schleuder {
+ package { 'schleuder':
+ ensure => installed,
+ }
+}
diff --git a/manifests/system.pp b/manifests/system.pp
index 86781ad..991764b 100644
--- a/manifests/system.pp
+++ b/manifests/system.pp
@@ -38,6 +38,7 @@ class mail::system {
# Subsystems
include mail::packages
+ include mail::base
include mail::sasl
include mail::tls
include mail::dovecot
@@ -46,7 +47,7 @@ class mail::system {
include mail::postfixadmin
include mail::web
- # Mailing list manager
+ # Sympa mailing list manager
case $mail_sympa {
true: {
@@ -64,55 +65,10 @@ class mail::system {
}
}
- # Postfix configuration
- postfix::config {
- "mydomain": value => "$domain";
- "myhostname": value => "$fqdn";
- "mydestination": value => "$postfix_mydestination";
- "mynetworks": value => "$postfix_mynetworks";
- "relay_domains": value => '$mydestination';
- "transport_maps": value => "hash:/etc/postfix/transport";
- "mailbox_command": value => '/usr/bin/maildrop -d ${USER}';
- "virtual_mailbox_base": value => '/var/mail/virtual';
- "virtual_uid_maps": value => 'static:5000';
- "virtual_gid_maps": value => 'static:5000';
- "virtual_transport": value => 'dovecot';
- "dovecot_destination_recipient_limit": value => '1';
- "recipient_delimiter": value => '+';
- }
-
- postfix::hash { "/etc/postfix/virtual":
- ensure => present,
- }
-
- postfix::hash { "/etc/postfix/transport":
- ensure => present,
- }
-
- # Recipient restrictions
- postfix::config { "smtpd_recipient_restrictions":
- value => 'permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_rbl_client psbl.surriel.com, check_policy_service inet:127.0.0.1:60000' }
-
- # Virtual mailboxes
- file { '/var/mail/virtual':
- ensure => directory,
- owner => vmail,
- group => vmail,
- mode => 0750,
- require => User['vmail'],
- }
-
- group { "vmail":
- ensure => present,
- gid => 5000,
- }
-
- user { "vmail":
- ensure => present,
- uid => 5000,
- gid => "vmail",
- password => "*",
- home => '/var/mail/virtual',
- require => Group['vmail'],
+ # Schleuder mailing list manager
+ case $mail_schleuder {
+ true: {
+ include mail::packages::schleuder
+ }
}
}