diff options
author | varac <varacanero@zeromail.org> | 2013-07-10 14:10:22 +0200 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2013-07-10 15:43:30 +0200 |
commit | c11047649e1ef630b48b007fb757fcc68b747e62 (patch) | |
tree | 96ae277c03fc81ff119799e3bfdb22a0c7984476 /puppet/modules/site_postfix/manifests/mx/tls.pp | |
parent | 0f95eccb08b80c02db99d57da413025813766d5e (diff) |
added tls support, including smtp auth via client cert
Diffstat (limited to 'puppet/modules/site_postfix/manifests/mx/tls.pp')
-rw-r--r-- | puppet/modules/site_postfix/manifests/mx/tls.pp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/puppet/modules/site_postfix/manifests/mx/tls.pp b/puppet/modules/site_postfix/manifests/mx/tls.pp new file mode 100644 index 00000000..7da38100 --- /dev/null +++ b/puppet/modules/site_postfix/manifests/mx/tls.pp @@ -0,0 +1,31 @@ +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, + } + + x509::cert { $cert_name: + content => $cert, + } + + postfix::config { + 'smtpd_use_tls': value => 'yes'; + 'smtpd_tls_CAfile': value => $client_ca; + 'smtpd_tls_cert_file': value => $cert_path; + 'smtpd_tls_key_file': value => $key_path; + 'smtpd_tls_req_ccert': value => 'yes'; + 'smtpd_tls_security_level': + value => 'encrypt'; + } + +} |