Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #13 from clkao-cookbooks/COOK-1662

configurable inet_interfaces. COOK-1662
  • Loading branch information...
commit bc71fa11db9c591ac209c52b5b711b33aee9aab5 2 parents 83e521a + e2ecce7
@jtimberman jtimberman authored
Showing with 7 additions and 2 deletions.
  1. +5 −0 metadata.rb
  2. +2 −2 templates/default/main.cf.erb
View
5 metadata.rb
@@ -68,6 +68,11 @@
:description => "Sets the value of smtp_sasl_security_options in main.cf",
:default => "noanonymous"
+attribute "postfix/inet_interfaces",
+ :display_name => "Postfix listening interfaces",
+ :description => "Interfaces to listen to, all or loopback-only. default is all for master mail_type, and loopback-only otherwise",
+ :default => ""
+
attribute "postfix/smtp_tls_cafile",
:display_name => "Postfix SMTP TLS CA File",
:description => "CA certificate file for SMTP over TLS",
View
4 templates/default/main.cf.erb
@@ -31,11 +31,11 @@ mydestination = <%= node['postfix']['myhostname'] %>, <%= node['hostname'] %>, l
<% if node['postfix']['mail_type'] == "master" -%>
relayhost =
mynetworks = <%= node['postfix']['mail_relay_networks'] %>
-inet_interfaces = all
+inet_interfaces = <%= node[:postfix][:inet_interfaces] || 'all' %>
<% else -%>
relayhost = <%= node['postfix']['relayhost'] %>
mynetworks = <%= node['postfix']['mail_relay_networks'] %>
-inet_interfaces = loopback-only
+inet_interfaces = <%= node[:postfix][:inet_interfaces] || 'loopback-only' %>
<% end -%>
<% if node['postfix']['use_procmail'] -%>
mailbox_command = /usr/bin/procmail -a "$EXTENSION"
Please sign in to comment.
Something went wrong with that request. Please try again.