diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2010-08-15 13:40:41 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2010-08-15 13:40:41 -0300 |
commit | 2a99530fd499534282de62737f72ce1ef6b106c9 (patch) | |
tree | 3cf8896833993ef547a3cb0bead4b2f74c0e20f0 /manifests/base.pp | |
parent | 35b2c40b791bcbc355c84502aba7e588f8c4bad5 (diff) | |
download | puppet-mail-2a99530fd499534282de62737f72ce1ef6b106c9.tar.gz puppet-mail-2a99530fd499534282de62737f72ce1ef6b106c9.tar.bz2 |
Adding schleuder package class, imp4 package and mail::base class
Diffstat (limited to 'manifests/base.pp')
-rw-r--r-- | manifests/base.pp | 53 |
1 files changed, 53 insertions, 0 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'], + } +} |