configurable inet_interfaces

This commit is contained in:
Chia-liang Kao 2012-09-16 22:09:02 +08:00
parent 682fe0c10b
commit e2ecce710b
2 changed files with 7 additions and 2 deletions

View File

@ -68,6 +68,11 @@ attribute "postfix/smtp_sasl_security_options",
: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 File

@ -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"