summaryrefslogtreecommitdiff
path: root/manifests/system.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-08-08 00:14:04 -0300
committerSilvio Rhatto <rhatto@riseup.net>2010-08-08 00:14:04 -0300
commitf6962d88c6b92ab18e10a9051a49c612d83306a5 (patch)
treef6dc2f8a478aedc389b1b80a33c75819dce95a6e /manifests/system.pp
parent4febaae9f2f816bd606d3c05456e47b44dcaeb24 (diff)
downloadpuppet-mail-f6962d88c6b92ab18e10a9051a49c612d83306a5.tar.gz
puppet-mail-f6962d88c6b92ab18e10a9051a49c612d83306a5.tar.bz2
Base class rename
Diffstat (limited to 'manifests/system.pp')
-rw-r--r--manifests/system.pp49
1 files changed, 49 insertions, 0 deletions
diff --git a/manifests/system.pp b/manifests/system.pp
new file mode 100644
index 0000000..8194bea
--- /dev/null
+++ b/manifests/system.pp
@@ -0,0 +1,49 @@
+class mail::system {
+ $postfix_smtp_listen = "all"
+ $postfix_use_amavisd = "yes"
+ $postfix_mydestination = '$myhostname, $mydomain, localhost.$mydomain, localhost'
+
+ case $postfix_mynetworks {
+ '': { $postfix_mynetworks = "127.0.0.0/8" }
+ }
+
+ # Module requirements
+ include postfix
+ include database
+ include ssl::mail
+
+ # Subsystems
+ include mail::packages
+ include mail::sasl
+ include mail::tls
+
+ # TODO
+ #include mail::dovecot
+ #include mail::postfixadmin
+ #include mail::header_checks
+ #include mail::amavisd
+
+ # Postfix configuration
+ postfix::config {
+ "mydomain": value => "$domain";
+ "myhostname": value => "$fqdn";
+ "mydestination": value => "$postfix_mydestination";
+ "mynetworks": value => "$postfix_mynetworks";
+ "relay_domains": value => "$domain";
+ "transport_maps": value => "hash:/etc/postfix/transport";
+ "mailbox_command": value => '/usr/bin/maildrop -d ${USER}';
+ "mailbox_command": value => '/var/mail/virtual';
+ }
+
+ 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' }
+}