summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2013-04-22 22:15:51 +0200
committervarac <varacanero@zeromail.org>2013-07-09 14:16:59 +0200
commitd14758f02a6a7d2b8675ea538692bba44b72689d (patch)
tree72bdaa1f04ea8b864dd2e3b8308b8c634b9ffc79
parent886551dfd2e6eb7dc51d15ebbd6393198dfde78f (diff)
Configure Postfix for incoming mails (Feature #2269)
-rw-r--r--puppet/modules/site_postfix/manifests/mx.pp42
1 files changed, 40 insertions, 2 deletions
diff --git a/puppet/modules/site_postfix/manifests/mx.pp b/puppet/modules/site_postfix/manifests/mx.pp
index 15449001..4bab7722 100644
--- a/puppet/modules/site_postfix/manifests/mx.pp
+++ b/puppet/modules/site_postfix/manifests/mx.pp
@@ -8,8 +8,46 @@ class site_postfix::mx {
$postfix_smtp_listen = 'all'
postfix::config {
- # just en example
- 'delay_warning_time': value => '4h';
+ 'mydestination':
+ value => "\$myorigin, localhost, localhost.\$mydomain, ${domain}";
+ 'smtpd_recipient_restrictions':
+ 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';
+ }
+
+ 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,
+ comment => 'Leap Mailspool',
+ home => '/var/mail/vmail',
+ shell => '/bin/false',
+ managehome => true,
}
include ::postfix