summaryrefslogtreecommitdiff
path: root/puppet
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2013-04-22 22:15:51 +0200
committerMicah Anderson <micah@leap.se>2013-07-25 13:50:18 -0400
commite5e64291b584340032655ff7c9398067691b06f6 (patch)
tree2f11b288b5ec57dc58ac9beab55725882e81d819 /puppet
parent230ca974a555f0391a6d1d5455d5f779c7b79828 (diff)
Configure Postfix for incoming mails (Feature #2269)
Diffstat (limited to 'puppet')
-rw-r--r--puppet/modules/site_postfix/manifests/mx.pp31
1 files changed, 30 insertions, 1 deletions
diff --git a/puppet/modules/site_postfix/manifests/mx.pp b/puppet/modules/site_postfix/manifests/mx.pp
index 72c38ab1..0d2a545a 100644
--- a/puppet/modules/site_postfix/manifests/mx.pp
+++ b/puppet/modules/site_postfix/manifests/mx.pp
@@ -18,9 +18,36 @@ class site_postfix::mx {
'luser_relay': value => 'vmail';
'local_recipient_maps': value => '';
#'debug_peer_list': value => '127.0.0.1';
+ value => 'check_recipient_access hash:/etc/postfix/recipient,reject_unauth_destination';
+ 'mailbox_size_limit':
+ value => '0';
+ 'home_mailbox':
+ value => 'Maildir/';
+ 'virtual_alias_maps':
+ value => 'hash:/etc/postfix/virtual';
}
- include site_postfix::mx::smtpd_checks
+ postfix::hash { '/etc/postfix/virtual': }
+ postfix::hash { '/etc/postfix/recipient': }
+
+ # for now, accept all mail
+ line {'deliver to vmail':
+ file => '/etc/postfix/recipient',
+ line => "@${domain} vmail",
+ notify => Exec['generate /etc/postfix/recipient.db'],
+ require => Package['postfix'],
+ }
+
+ postfix::virtual { "@${domain}": destination => 'vmail'; }
+ #postfix::mailalias { 'vmail': recipient => 'vmail' }
+
+ user { 'vmail':
+ ensure => present,
+ comment => 'Leap Mailspool',
+ home => '/var/mail/vmail',
+ shell => '/bin/false',
+ managehome => true,
+ }
user { 'vmail':
ensure => present,
@@ -30,6 +57,8 @@ class site_postfix::mx {
managehome => true,
}
+ include site_postfix::mx::smtpd_checks
+
class { 'postfix':
root_mail_recipient => $root_mail_recipient,
smtp_listen => 'all'