Permalink
Browse files

postfix: Allow disabling smtpd TLS via an attribute

  • Loading branch information...
Alex Tomlins authored and jtimberman committed May 11, 2011
1 parent 1d74a68 commit ab2999ea6041608fa683585a16c3223fac062889
Showing with 5 additions and 1 deletion.
  1. +2 −0 attributes/default.rb
  2. +3 −1 templates/default/main.cf.erb
View
@@ -5,6 +5,8 @@
default[:postfix][:relayhost] = ""
default[:postfix][:mail_relay_networks] = "127.0.0.0/8"
+default[:postfix][:smtpd_use_tls] = "yes"
+
default[:postfix][:smtp_sasl_auth_enable] = "no"
default[:postfix][:smtp_sasl_password_maps] = "hash:/etc/postfix/sasl_passwd"
default[:postfix][:smtp_sasl_security_options] = "noanonymous"
@@ -5,10 +5,12 @@
biff = no
append_dot_mydomain = no
+smtpd_use_tls = <%= node[:postfix][:smtpd_use_tls] %>
+<% if node[:postfix][:smtpd_use_tls] == "yes" -%>
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
-smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
+<% end -%>
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
smtp_sasl_auth_enable = <%= node[:postfix][:smtp_sasl_auth_enable] %>
<% if node[:postfix][:smtp_sasl_auth_enable] == "yes" -%>

0 comments on commit ab2999e

Please sign in to comment.