summaryrefslogtreecommitdiff
path: root/puppet/modules/site_postfix/manifests/mx.pp
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2013-07-10 14:10:22 +0200
committervarac <varacanero@zeromail.org>2013-07-10 15:43:30 +0200
commitc11047649e1ef630b48b007fb757fcc68b747e62 (patch)
tree96ae277c03fc81ff119799e3bfdb22a0c7984476 /puppet/modules/site_postfix/manifests/mx.pp
parent0f95eccb08b80c02db99d57da413025813766d5e (diff)
added tls support, including smtp auth via client cert
Diffstat (limited to 'puppet/modules/site_postfix/manifests/mx.pp')
-rw-r--r--puppet/modules/site_postfix/manifests/mx.pp16
1 files changed, 10 insertions, 6 deletions
diff --git a/puppet/modules/site_postfix/manifests/mx.pp b/puppet/modules/site_postfix/manifests/mx.pp
index a625cdcd..e9656072 100644
--- a/puppet/modules/site_postfix/manifests/mx.pp
+++ b/puppet/modules/site_postfix/manifests/mx.pp
@@ -3,6 +3,7 @@ class site_postfix::mx {
$domain_hash = hiera ('domain')
$domain = $domain_hash['full_suffix']
$mx_hash = hiera('mx')
+ $cert_name = hiera('name')
$root_mail_recipient = $mx_hash['contact']
$postfix_smtp_listen = 'all'
@@ -12,15 +13,16 @@ class site_postfix::mx {
value => "\$myorigin, localhost, localhost.\$mydomain, ${domain}";
'smtpd_recipient_restrictions':
value => 'check_recipient_access tcp:localhost:2244,reject_unauth_destination,permit_tls_all_clientcerts';
- 'mailbox_size_limit': value => '0';
- 'home_mailbox': value => 'Maildir/';
- 'virtual_alias_maps': value => 'tcp:localhost:4242';
- 'luser_relay': value => 'vmail';
- 'local_recipient_maps': value => '';
+ 'mailbox_size_limit': value => '0';
+ 'home_mailbox': value => 'Maildir/';
+ 'virtual_alias_maps': value => 'tcp:localhost:4242';
+ 'luser_relay': value => 'vmail';
+ 'local_recipient_maps': value => '';
#'debug_peer_list': value => '127.0.0.1';
}
include site_postfix::mx::smtpd_checks
+ include site_postfix::mx::tls
user { 'vmail':
ensure => present,
@@ -32,6 +34,8 @@ class site_postfix::mx {
class { 'postfix':
root_mail_recipient => $root_mail_recipient,
- smtp_listen => 'all'
+ smtp_listen => 'all',
+ require => [ X509::Key[$cert_name], X509::Cert[$cert_name],
+ User['vmail'] ]
}
}