summaryrefslogtreecommitdiff
path: root/puppet/modules/site_postfix/manifests
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2013-09-19 11:51:43 +0200
committervarac <varacanero@zeromail.org>2013-09-19 11:51:43 +0200
commite2ea69580ff9417efb7a85e8190d331051323ff3 (patch)
tree3e67e75e932d683084863c5bae5981ed17c98964 /puppet/modules/site_postfix/manifests
parentca3f34da520ff835d383aa82f528adf927d3364f (diff)
parent1f9003eb6ed90400279011d477e6143e2eb6e2db (diff)
Merge branch 'feature/3832_Unify_x509_certs,_keys_and_ca' into develop
Diffstat (limited to 'puppet/modules/site_postfix/manifests')
-rw-r--r--puppet/modules/site_postfix/manifests/mx.pp3
-rw-r--r--puppet/modules/site_postfix/manifests/mx/tls.pp20
2 files changed, 5 insertions, 18 deletions
diff --git a/puppet/modules/site_postfix/manifests/mx.pp b/puppet/modules/site_postfix/manifests/mx.pp
index 2d8f3db5..4a7d66ed 100644
--- a/puppet/modules/site_postfix/manifests/mx.pp
+++ b/puppet/modules/site_postfix/manifests/mx.pp
@@ -44,7 +44,6 @@ submission inet n - n - - smtpd
-o smtpd_tls_security_level=encrypt
-o smtpd_recipient_restrictions=\$submission_recipient_restrictions
-o smtpd_helo_restrictions=\$submission_helo_restrictions",
- require => [
- X509::Key[$cert_name], X509::Cert[$cert_name], User['vmail'] ]
+ require => Class['Site_config::X509']
}
}
diff --git a/puppet/modules/site_postfix/manifests/mx/tls.pp b/puppet/modules/site_postfix/manifests/mx/tls.pp
index 8c9da9db..34df72bb 100644
--- a/puppet/modules/site_postfix/manifests/mx/tls.pp
+++ b/puppet/modules/site_postfix/manifests/mx/tls.pp
@@ -1,26 +1,14 @@
class site_postfix::mx::tls {
- $x509 = hiera('x509')
- $key = $x509['key']
- $cert = $x509['cert']
- $client_ca = $x509['client_ca_cert']
-
include x509::variables
- $cert_name = hiera('name')
- $cert_path = "${x509::variables::certs}/${cert_name}.crt"
- $key_path = "${x509::variables::keys}/${cert_name}.key"
-
- x509::key { $cert_name:
- content => $key,
- }
+ $ca_path = "${x509::variables::local_CAs}/${site_config::params::client_ca_name}.crt"
+ $cert_path = "${x509::variables::certs}/${site_config::params::cert_name}.crt"
+ $key_path = "${x509::variables::keys}/${site_config::params::cert_name}.key"
- x509::cert { $cert_name:
- content => $cert,
- }
postfix::config {
'smtpd_use_tls': value => 'yes';
- 'smtpd_tls_CAfile': value => $client_ca;
+ 'smtpd_tls_CAfile': value => $ca_path;
'smtpd_tls_cert_file': value => $cert_path;
'smtpd_tls_key_file': value => $key_path;
'smtpd_tls_ask_ccert': value => 'yes';