summaryrefslogtreecommitdiff
path: root/manifests/mail.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-08-04 22:43:58 -0300
committerSilvio Rhatto <rhatto@riseup.net>2010-08-04 22:43:58 -0300
commitdad5888cea24eb71cb58d0a260a208ba6e2d8073 (patch)
treef84b5e77b78a39b85a141a9e00c0622689d7ca27 /manifests/mail.pp
downloadpuppet-mail-dad5888cea24eb71cb58d0a260a208ba6e2d8073.tar.gz
puppet-mail-dad5888cea24eb71cb58d0a260a208ba6e2d8073.tar.bz2
Initial import
Diffstat (limited to 'manifests/mail.pp')
-rw-r--r--manifests/mail.pp48
1 files changed, 48 insertions, 0 deletions
diff --git a/manifests/mail.pp b/manifests/mail.pp
new file mode 100644
index 0000000..0864b7c
--- /dev/null
+++ b/manifests/mail.pp
@@ -0,0 +1,48 @@
+class mail {
+ $mail_delivery = "postfix"
+ $postfix_smtp_listen = "all"
+ $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
+
+ # Postfix configuration
+ postfix::config {
+ "mydomain": value => "$domain";
+ "myhostname": value => "$fqdn";
+ "mydestination": value => "$postfix_mydestination";
+ "mynetworks": value => "$postfix_mynetworks";
+ "relay_domains": value => "$domain";
+ "virtual_alias_maps": value => "hash:/etc/postfix/virtual"; # TODO: use postfixadmin config instead
+ "transport_maps": value => "hash:/etc/postfix/transport";
+ "mailbox_command": value => '/usr/bin/maildrop -d ${USER}';
+ }
+
+ 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' }
+}