aboutsummaryrefslogtreecommitdiff
path: root/manifests/mail.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-08-04 22:48:34 -0300
committerSilvio Rhatto <rhatto@riseup.net>2010-08-04 22:48:34 -0300
commiteffce887eb4b82cd57fff3d908d931f7bbe2fdc7 (patch)
treec107c140e1967c97bbbf521c60bdb89529496b90 /manifests/mail.pp
parent6e2e4e41250be55d171589e69709aad3ffe79832 (diff)
downloadpuppet-nodo-effce887eb4b82cd57fff3d908d931f7bbe2fdc7.tar.gz
puppet-nodo-effce887eb4b82cd57fff3d908d931f7bbe2fdc7.tar.bz2
Using mail module
Diffstat (limited to 'manifests/mail.pp')
-rw-r--r--manifests/mail.pp71
1 files changed, 1 insertions, 70 deletions
diff --git a/manifests/mail.pp b/manifests/mail.pp
index 78a3b7b..46c2db8 100644
--- a/manifests/mail.pp
+++ b/manifests/mail.pp
@@ -1,74 +1,5 @@
class nodo::mail {
# Class for mail nodes
- $mail_delivery = "postfix"
- $postfix_smtp_listen = "all"
- $postfix_mydestination = '$myhostname, $mydomain, localhost.$mydomain, localhost'
-
- case $postfix_mynetworks {
- '': { $postfix_mynetworks = "127.0.0.0/8" }
- }
-
include nodo::vserver
- include postfix
- include database
- include ssl::mail
-
- # The needed packages
- package { [ 'postfix-mysql', 'dovecot-imapd', 'maildrop' ]:
- ensure => installed,
- }
-
- package { [ 'libauthen-sasl-cyrus-perl', 'libpam-mysql', 'libsasl2-modules',
- 'libsasl2-modules-sql', 'libgsasl7', 'sasl2-bin' ]:
- ensure => installed,
- }
-
- package { [ 'postgrey', 'amavisd-new', 'spamassassin', 'spamc' ]:
- ensure => installed,
- }
-
- package { [ 'clamav-base', 'clamav-daemon', 'clamav-freshclam' ]:
- ensure => installed,
- }
-
- package { [ 'squirrelmail', 'squirrelmail-secure-login', 'squirrelmail-locales' ]:
- ensure => installed,
- }
-
- # 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";
- "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,
- }
-
- # SASL
- postfix::config { "smtpd_sasl_auth_enable": value => 'yes' }
- postfix::config { "smtpd_sasl_local_domain": value => '$myhostname' }
- postfix::config { "smtpd_sasl_security_options": value => 'noanonymous' }
- postfix::config { "broken_sasl_auth_clients": value => 'yes' }
- postfix::config { "smtpd_sasl_authenticated_header": value => 'yes' }
-
- # 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' }
-
- # TLS
- postfix::config { "smtpd_tls_cert_file": value => '/etc/ssl/certs/cert.crt' }
- postfix::config { "smtpd_tls_key_file": value => '/etc/ssl/private/cert.pem' }
- postfix::config { "smtpd_use_tls": value => 'yes' }
- postfix::config { "smtp_use_tls": value => 'yes' }
+ include mail
}