postfix: Attempt a chain fix.

This commit is contained in:
Lari Huttunen 2013-03-05 17:03:29 +01:00
parent 5f3e6c481c
commit b20d06b37f
2 changed files with 18 additions and 0 deletions

View file

@ -32,6 +32,9 @@
# $postfix_cert: # $postfix_cert:
# Path to SSL certificate. Defaults to puppet client certificate. # Path to SSL certificate. Defaults to puppet client certificate.
# #
# $postfix_chain:
# Path to intermediary CA cert.
#
# $postgrey: # $postgrey:
# Whether to run postgrey or not. # Whether to run postgrey or not.
# #
@ -81,6 +84,18 @@ class postfix {
notify => Service["postfix"], notify => Service["postfix"],
} }
if $postfix_chain {
file { "${ssl::certs}/chain.crt":
ensure => present,
source => $postfix_chain,
mode => "0644",
owner => "root",
group => "root",
require => Package["postfix"],
notify => Service["postfix"],
}
}
file { "${ssl::private}/postfix.key": file { "${ssl::private}/postfix.key":
ensure => present, ensure => present,
source => $postfix_key, source => $postfix_key,

View file

@ -731,6 +731,9 @@ smtpd_sasl_security_options = noanonymous
# TLS # TLS
# #
smtpd_use_tls=yes smtpd_use_tls=yes
<% if has_variable?("postfix_chain") -%>
smtpd_tls_CAfile = <%= postfix_chain %>
<% end -%>
smtpd_tls_cert_file=<%= scope.lookupvar('ssl::certs') %>/postfix.crt smtpd_tls_cert_file=<%= scope.lookupvar('ssl::certs') %>/postfix.crt
smtpd_tls_key_file=<%= scope.lookupvar('ssl::private') %>/postfix.key smtpd_tls_key_file=<%= scope.lookupvar('ssl::private') %>/postfix.key
smtpd_tls_received_header = yes smtpd_tls_received_header = yes