cutting rubocop offenses down to 32

This commit is contained in:
Sean OMeara 2013-11-04 21:37:55 -05:00
parent 4675d7736a
commit b113d5bc48
13 changed files with 151 additions and 149 deletions

View File

@ -1,4 +1,4 @@
# # encoding: utf-8
# Author:: Joshua Timberman <joshua@opscode.com> # Author:: Joshua Timberman <joshua@opscode.com>
# Copyright:: Copyright (c) 2009, Opscode, Inc. # Copyright:: Copyright (c) 2009, Opscode, Inc.
# License:: Apache License, Version 2.0 # License:: Apache License, Version 2.0
@ -16,13 +16,13 @@
# limitations under the License. # limitations under the License.
# Generic cookbook attributes # Generic cookbook attributes
default['postfix']['mail_type'] = "client" default['postfix']['mail_type'] = 'client'
default['postfix']['relayhost_role'] = "relayhost" default['postfix']['relayhost_role'] = 'relayhost'
default['postfix']['multi_environment_relay'] = false default['postfix']['multi_environment_relay'] = false
default['postfix']['use_procmail'] = false default['postfix']['use_procmail'] = false
default['postfix']['aliases'] = {} default['postfix']['aliases'] = {}
default['postfix']['main_template_source'] = "postfix" default['postfix']['main_template_source'] = 'postfix'
default['postfix']['master_template_source'] = "postfix" default['postfix']['master_template_source'] = 'postfix'
default['postfix']['sender_canonical_map_entries'] = {} default['postfix']['sender_canonical_map_entries'] = {}
case node['platform'] case node['platform']
@ -35,63 +35,63 @@ else
end end
# Non-default main.cf attributes # Non-default main.cf attributes
default['postfix']['main']['biff'] = "no" default['postfix']['main']['biff'] = 'no'
default['postfix']['main']['append_dot_mydomain'] = "no" default['postfix']['main']['append_dot_mydomain'] = 'no'
default['postfix']['main']['myhostname'] = (node['fqdn'] || node['hostname']).to_s.chomp('.') default['postfix']['main']['myhostname'] = (node['fqdn'] || node['hostname']).to_s.chomp('.')
default['postfix']['main']['mydomain'] = (node['domain'] || node['hostname']).to_s.chomp('.') default['postfix']['main']['mydomain'] = (node['domain'] || node['hostname']).to_s.chomp('.')
default['postfix']['main']['myorigin'] = "$myhostname" default['postfix']['main']['myorigin'] = '$myhostname'
default['postfix']['main']['mydestination'] = [ node['postfix']['main']['myhostname'], node['hostname'], "localhost.localdomain", "localhost" ].compact default['postfix']['main']['mydestination'] = [node['postfix']['main']['myhostname'], node['hostname'], 'localhost.localdomain', 'localhost'].compact
default['postfix']['main']['smtpd_use_tls'] = "yes" default['postfix']['main']['smtpd_use_tls'] = 'yes'
default['postfix']['main']['smtp_use_tls'] = "yes" default['postfix']['main']['smtp_use_tls'] = 'yes'
default['postfix']['main']['alias_maps'] = ["hash:#{node['postfix']['aliases_db']}"] default['postfix']['main']['alias_maps'] = ["hash:#{node['postfix']['aliases_db']}"]
default['postfix']['main']['mailbox_size_limit'] = 0 default['postfix']['main']['mailbox_size_limit'] = 0
default['postfix']['main']['recipient_delimiter'] = "+" default['postfix']['main']['recipient_delimiter'] = '+'
default['postfix']['main']['smtp_sasl_auth_enable'] = "no" default['postfix']['main']['smtp_sasl_auth_enable'] = 'no'
default['postfix']['main']['mynetworks'] = "127.0.0.0/8" default['postfix']['main']['mynetworks'] = '127.0.0.0/8'
default['postfix']['main']['inet_interfaces'] = "loopback-only" default['postfix']['main']['inet_interfaces'] = 'loopback-only'
# Conditional attributes # Conditional attributes
case node['platform'] case node['platform']
when 'smartos' when 'smartos'
default['postfix']['main']['smtpd_use_tls'] = "no" default['postfix']['main']['smtpd_use_tls'] = 'no'
default['postfix']['main']['smtp_use_tls'] = "no" default['postfix']['main']['smtp_use_tls'] = 'no'
cafile = "/opt/local/etc/postfix/cacert.pem" cafile = '/opt/local/etc/postfix/cacert.pem'
when "rhel" when 'rhel'
cafile = "/etc/pki/tls/cert.pem" cafile = '/etc/pki/tls/cert.pem'
else else
cafile = "/etc/postfix/cacert.pem" cafile = '/etc/postfix/cacert.pem'
end end
if node['postfix']['use_procmail'] if node['postfix']['use_procmail']
default['postfix']['main']['mailbox_command'] = '/usr/bin/procmail -a "$EXTENSION"' default['postfix']['main']['mailbox_command'] = '/usr/bin/procmail -a "$EXTENSION"'
end end
if node['postfix']['main']['smtpd_use_tls'] == "yes" if node['postfix']['main']['smtpd_use_tls'] == 'yes'
default['postfix']['main']['smtpd_tls_cert_file'] = "/etc/ssl/certs/ssl-cert-snakeoil.pem" default['postfix']['main']['smtpd_tls_cert_file'] = '/etc/ssl/certs/ssl-cert-snakeoil.pem'
default['postfix']['main']['smtpd_tls_key_file'] = "/etc/ssl/private/ssl-cert-snakeoil.key" default['postfix']['main']['smtpd_tls_key_file'] = '/etc/ssl/private/ssl-cert-snakeoil.key'
default['postfix']['main']['smtpd_tls_CAfile'] = cafile default['postfix']['main']['smtpd_tls_CAfile'] = cafile
default['postfix']['main']['smtpd_tls_session_cache_database'] = "btree:${data_directory}/smtpd_scache" default['postfix']['main']['smtpd_tls_session_cache_database'] = 'btree:${data_directory}/smtpd_scache'
end end
if node['postfix']['main']['smtp_use_tls'] == "yes" if node['postfix']['main']['smtp_use_tls'] == 'yes'
default['postfix']['main']['smtp_tls_CAfile'] = cafile default['postfix']['main']['smtp_tls_CAfile'] = cafile
default['postfix']['main']['smtp_tls_session_cache_database'] = "btree:${data_directory}/smtp_scache" default['postfix']['main']['smtp_tls_session_cache_database'] = 'btree:${data_directory}/smtp_scache'
end end
if node['postfix']['main']['smtp_sasl_auth_enable'] == "yes" if node['postfix']['main']['smtp_sasl_auth_enable'] == 'yes'
default['postfix']['main']['smtp_sasl_password_maps'] = "hash:#{node['postfix']['conf_dir']}/postfix/sasl_passwd" default['postfix']['main']['smtp_sasl_password_maps'] = "hash:#{node['postfix']['conf_dir']}/postfix/sasl_passwd"
default['postfix']['main']['smtp_sasl_security_options'] = "noanonymous" default['postfix']['main']['smtp_sasl_security_options'] = 'noanonymous'
default['postfix']['sasl']['smtp_sasl_user_name'] = "" default['postfix']['sasl']['smtp_sasl_user_name'] = ''
default['postfix']['sasl']['smtp_sasl_passwd'] = "" default['postfix']['sasl']['smtp_sasl_passwd'] = ''
default['postfix']['main']['relayhost'] = "" default['postfix']['main']['relayhost'] = ''
end end
# Default main.cf attributes according to `postconf -d` # # Default main.cf attributes according to `postconf -d`
#default['postfix']['main']['relayhost'] = "" # default['postfix']['main']['relayhost'] = ''
#default['postfix']['main']['milter_default_action'] = "tempfail" # default['postfix']['main']['milter_default_action'] = 'tempfail'
#default['postfix']['main']['milter_protocol'] = "6" # default['postfix']['main']['milter_protocol'] = '6'
#default['postfix']['main']['smtpd_milters'] = "" # default['postfix']['main']['smtpd_milters'] = ''
#default['postfix']['main']['non_smtpd_milters'] = "" # default['postfix']['main']['non_smtpd_milters'] = ''
# default['postfix']['main']['sender_canonical_classes'] = nil # default['postfix']['main']['sender_canonical_classes'] = nil
# default['postfix']['main']['recipient_canonical_classes'] = nil # default['postfix']['main']['recipient_canonical_classes'] = nil
# default['postfix']['main']['canonical_classes'] = nil # default['postfix']['main']['canonical_classes'] = nil

View File

@ -1,4 +1,4 @@
# # encoding: utf-8
# Copyright 2012, Opscode, Inc. # Copyright 2012, Opscode, Inc.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
@ -16,11 +16,11 @@
require File.expand_path('../support/helpers', __FILE__) require File.expand_path('../support/helpers', __FILE__)
describe "postfix::aliases" do describe 'postfix::aliases' do
include Helpers::Postfix include Helpers::Postfix
it 'manages /etc/aliases' do it 'manages /etc/aliases' do
file("/etc/aliases").must_match(/^# This file is generated by Chef for/) file('/etc/aliases').must_match(/^# This file is generated by Chef for/)
end end
end end

View File

@ -1,4 +1,4 @@
# # encoding: utf-8
# Copyright 2012, Opscode, Inc. # Copyright 2012, Opscode, Inc.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
@ -16,9 +16,9 @@
require File.expand_path('../support/helpers', __FILE__) require File.expand_path('../support/helpers', __FILE__)
describe "postfix::client" do describe 'postfix::client' do
include Helpers::Postfix include Helpers::Postfix
it 'doesnt configure postfix because solo is unsupported' do it 'doesnt configure postfix because solo is unsupported' do
skip "Postfix may be set up by default on the system, but not configured by Chef because this test assumes it is run under Chef Solo" skip 'Postfix may be set up by default on the system, but not configured by Chef because this test assumes it is run under Chef Solo'
end end
end end

View File

@ -1,4 +1,4 @@
# # encoding: utf-8
# Copyright 2012, Opscode, Inc. # Copyright 2012, Opscode, Inc.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
@ -16,23 +16,23 @@
require File.expand_path('../support/helpers', __FILE__) require File.expand_path('../support/helpers', __FILE__)
describe "postfix::default" do describe 'postfix::default' do
include Helpers::Postfix include Helpers::Postfix
it 'installs the postfix package' do it 'installs the postfix package' do
package("postfix").must_be_installed package('postfix').must_be_installed
end end
it 'enables the postfix service' do it 'enables the postfix service' do
service("postfix").must_be_enabled service('postfix').must_be_enabled
end end
it 'starts the postfix service' do it 'starts the postfix service' do
service("postfix").must_be_running service('postfix').must_be_running
end end
it 'configures postfix main.cf' do it 'configures postfix main.cf' do
file("/etc/postfix/main.cf").must_match(/^# Generated by Chef for /) file('/etc/postfix/main.cf').must_match(/^# Generated by Chef for /)
end end
end end

View File

@ -1,4 +1,4 @@
# # encoding: utf-8
# Copyright 2012, Opscode, Inc. # Copyright 2012, Opscode, Inc.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
@ -15,11 +15,11 @@
# #
require File.expand_path('../support/helpers', __FILE__) require File.expand_path('../support/helpers', __FILE__)
describe "postfix::sasl_auth" do describe 'postfix::sasl_auth' do
include Helpers::Postfix include Helpers::Postfix
it 'manages /etc/postfix/sasl_passwd' do it 'manages /etc/postfix/sasl_passwd' do
file("/etc/postfix/sasl_passwd").must_match(/^# This file is generated by Chef for/) file('/etc/postfix/sasl_passwd').must_match(/^# This file is generated by Chef for/)
end end
end end

View File

@ -1,4 +1,4 @@
# # encoding: utf-8
# Copyright 2012, Opscode, Inc. # Copyright 2012, Opscode, Inc.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
@ -15,9 +15,9 @@
# #
require File.expand_path('../support/helpers', __FILE__) require File.expand_path('../support/helpers', __FILE__)
describe "postfix::server" do describe 'postfix::server' do
include Helpers::Postfix include Helpers::Postfix
it 'doesnt configure postfix because solo is unsupported' do it 'doesnt configure postfix because solo is unsupported' do
skip "Postfix may be set up by default on the system, but not configured by Chef because this test assumes it is run under Chef Solo" skip 'Postfix may be set up by default on the system, but not configured by Chef because this test assumes it is run under Chef Solo'
end end
end end

View File

@ -1,4 +1,4 @@
# # encoding: utf-8
# Copyright 2012, Opscode, Inc. # Copyright 2012, Opscode, Inc.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
@ -14,11 +14,12 @@
# limitations under the License. # limitations under the License.
# #
# helpers
module Helpers module Helpers
# postfix
module Postfix module Postfix
include MiniTest::Chef::Assertions include MiniTest::Chef::Assertions
include MiniTest::Chef::Context include MiniTest::Chef::Context
include MiniTest::Chef::Resources include MiniTest::Chef::Resources
end end
end end

View File

@ -1,50 +1,51 @@
name "postfix" # encoding: utf-8
maintainer "Opscode, Inc." name 'postfix'
maintainer_email "cookbooks@opscode.com" description 'Installs and configures postfix for client or outbound relayhost, or to do SASL auth'
license "Apache 2.0" maintainer 'Opscode, Inc.'
description "Installs and configures postfix for client or outbound relayhost, or to do SASL auth" maintainer_email 'cookbooks@opscode.com'
version "3.0.3" license 'Apache 2.0'
recipe "postfix", "Installs and configures postfix" version '3.0.3'
recipe "postfix::sasl_auth", "Set up postfix to auth to a server with sasl" recipe 'postfix', 'Installs and configures postfix'
recipe "postfix::aliases", "Manages /etc/aliases" recipe 'postfix::sasl_auth', 'Set up postfix to auth to a server with sasl'
recipe "postfix::client", "Searches for the relayhost based on an attribute" recipe 'postfix::aliases', 'Manages /etc/aliases'
recipe "postfix::server", "Sets the mail_type attribute to master" recipe 'postfix::client', 'Searches for the relayhost based on an attribute'
recipe 'postfix::server', 'Sets the mail_type attribute to master'
%w{ubuntu debian redhat centos amazon scientific smartos}.each do |os| %w{ubuntu debian redhat centos amazon scientific smartos}.each do |os|
supports os supports os
end end
attribute "postfix/main", attribute 'postfix/main',
:display_name => "postfix/main", display_name: 'postfix/main',
:description => "Hash of Postfix main.cf attributes", description: 'Hash of Postfix main.cf attributes',
:type => "hash" type: 'hash'
attribute "postfix/aliases", attribute 'postfix/aliases',
:display_name => "Postfix Aliases", display_name: 'Postfix Aliases',
:description => "Hash of Postfix aliases mapping a name to a value. Example 'root' => 'operator@example.com'. See aliases man page for details.", description: "Hash of Postfix aliases mapping a name to a value. Example 'root' => 'operator@example.com'. See aliases man page for details.",
:type => "hash" type: 'hash'
attribute "postfix/mail_type", attribute 'postfix/mail_type',
:display_name => "Postfix Mail Type", display_name: 'Postfix Mail Type',
:description => "Is this node a client or server?", description: 'Is this node a client or server?',
:default => "client" default: 'client'
attribute "postfix/smtp_sasl_user_name", attribute 'postfix/smtp_sasl_user_name',
:display_name => "Postfix SMTP SASL Username", display_name: 'Postfix SMTP SASL Username',
:description => "User to auth SMTP via SASL", description: 'User to auth SMTP via SASL',
:default => "" default: ''
attribute "postfix/smtp_sasl_passwd", attribute 'postfix/smtp_sasl_passwd',
:display_name => "Postfix SMTP SASL Password", display_name: 'Postfix SMTP SASL Password',
:description => "Password for smtp_sasl_user_name", description: 'Password for smtp_sasl_user_name',
:default => "" default: ''
attribute "postfix/relayhost_role", attribute 'postfix/relayhost_role',
:display_name => "Postfix Relayhost's role", display_name: "Postfix Relayhost's role",
:description => "String containing the role name", description: 'String containing the role name',
:default => "relayhost" default: 'relayhost'
attribute "postfix/use_procmail", attribute 'postfix/use_procmail',
:display_name => "Postfix Use procmail?", display_name: 'Postfix Use procmail?',
:description => "Whether procmail should be used as the local delivery agent for a server", description: 'Whether procmail should be used as the local delivery agent for a server',
:default => "no" default: 'no'

View File

@ -1,4 +1,4 @@
# # encoding: utf-8
# Copyright:: Copyright (c) 2012, Opscode, Inc. # Copyright:: Copyright (c) 2012, Opscode, Inc.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
@ -14,14 +14,14 @@
# limitations under the License. # limitations under the License.
# #
include_recipe "postfix" include_recipe 'postfix'
execute "update-postfix-aliases" do execute 'update-postfix-aliases' do
command "newaliases" command 'newaliases'
action :nothing action :nothing
end end
template node['postfix']['aliases_db'] do template node['postfix']['aliases_db'] do
source "aliases.erb" source 'aliases.erb'
notifies :run, "execute[update-postfix-aliases]" notifies :run, 'execute[update-postfix-aliases]'
end end

View File

@ -1,4 +1,4 @@
# # encoding: utf-8
# Author:: Joshua Timberman(<joshua@opscode.com>) # Author:: Joshua Timberman(<joshua@opscode.com>)
# Cookbook Name:: postfix # Cookbook Name:: postfix
# Recipe:: client # Recipe:: client
@ -24,7 +24,7 @@ if Chef::Config[:solo]
end end
query = "role:#{node['postfix']['relayhost_role']}" query = "role:#{node['postfix']['relayhost_role']}"
relayhost = "" relayhost = ''
results = [] results = []
if node.run_list.roles.include?(node['postfix']['relayhost_role']) if node.run_list.roles.include?(node['postfix']['relayhost_role'])
@ -39,4 +39,4 @@ end
node.set['postfix']['main']['relayhost'] = "[#{relayhost}]" node.set['postfix']['main']['relayhost'] = "[#{relayhost}]"
include_recipe "postfix" include_recipe 'postfix'

View File

@ -1,4 +1,4 @@
# # encoding: utf-8
# Author:: Joshua Timberman(<joshua@opscode.com>) # Author:: Joshua Timberman(<joshua@opscode.com>)
# Cookbook Name:: postfix # Cookbook Name:: postfix
# Recipe:: default # Recipe:: default
@ -18,35 +18,35 @@
# limitations under the License. # limitations under the License.
# #
package "postfix" package 'postfix'
if node['postfix']['use_procmail'] if node['postfix']['use_procmail']
package "procmail" package 'procmail'
end end
case node['platform_family'] case node['platform_family']
when "rhel", "fedora" when 'rhel', 'fedora'
service "sendmail" do service 'sendmail' do
action :nothing action :nothing
end end
execute "switch_mailer_to_postfix" do execute 'switch_mailer_to_postfix' do
command "/usr/sbin/alternatives --set mta /usr/sbin/sendmail.postfix" command '/usr/sbin/alternatives --set mta /usr/sbin/sendmail.postfix'
notifies :stop, "service[sendmail]" notifies :stop, 'service[sendmail]'
notifies :start, "service[postfix]" notifies :start, 'service[postfix]'
not_if "/usr/bin/test /etc/alternatives/mta -ef /usr/sbin/sendmail.postfix" not_if '/usr/bin/test /etc/alternatives/mta -ef /usr/sbin/sendmail.postfix'
end end
end end
if !node['postfix']['sender_canonical_map_entries'].empty? if !node['postfix']['sender_canonical_map_entries'].empty?
template "#{node['postfix']['conf_dir']}/sender_canonical" do template "#{node['postfix']['conf_dir']}/sender_canonical" do
owner "root" owner 'root'
group 0 group 0
mode '0644' mode '0644'
notifies :restart, "service[postfix]" notifies :restart, 'service[postfix]'
end end
if !node['postfix']['main'].has_key?('sender_canonical_maps') if !node['postfix']['main'].key?('sender_canonical_maps')
node.set['postfix']['main']['sender_canonical_maps'] = "hash:#{node['postfix']['conf_dir']}/sender_canonical" node.set['postfix']['main']['sender_canonical_maps'] = "hash:#{node['postfix']['conf_dir']}/sender_canonical"
end end
end end
@ -54,16 +54,16 @@ end
%w{main master}.each do |cfg| %w{main master}.each do |cfg|
template "#{node['postfix']['conf_dir']}/#{cfg}.cf" do template "#{node['postfix']['conf_dir']}/#{cfg}.cf" do
source "#{cfg}.cf.erb" source "#{cfg}.cf.erb"
owner "root" owner 'root'
group 0 group 0
mode 00644 mode 00644
notifies :restart, "service[postfix]" notifies :restart, 'service[postfix]'
variables(:settings => node['postfix'][cfg]) variables(settings: node['postfix'][cfg])
cookbook node['postfix']["#{cfg}_template_source"] cookbook node['postfix']["#{cfg}_template_source"]
end end
end end
service "postfix" do service 'postfix' do
supports :status => true, :restart => true, :reload => true supports status: true, restart: true, reload: true
action [:enable, :start] action [:enable, :start]
end end

View File

@ -1,3 +1,4 @@
# encoding: utf-8
# #
# Author:: Joshua Timberman(<joshua@opscode.com>) # Author:: Joshua Timberman(<joshua@opscode.com>)
# Cookbook Name:: postfix # Cookbook Name:: postfix
@ -18,42 +19,40 @@
# limitations under the License. # limitations under the License.
# #
include_recipe "postfix" include_recipe 'postfix'
sasl_pkgs = [] sasl_pkgs = []
# We use case instead of value_for_platform_family because we need # We use case instead of value_for_platform_family because we need
# version specifics for RHEL. # version specifics for RHEL.
case node['platform_family'] case node['platform_family']
when "debian" when 'debian'
sasl_pkgs = %w{libsasl2-2 libsasl2-modules ca-certificates} sasl_pkgs = %w{libsasl2-2 libsasl2-modules ca-certificates}
when "rhel" when 'rhel'
if node['platform_version'].to_i < 6 if node['platform_version'].to_i < 6
sasl_pkgs = %w{cyrus-sasl cyrus-sasl-plain openssl} sasl_pkgs = %w{cyrus-sasl cyrus-sasl-plain openssl}
else else
sasl_pkgs = %w{cyrus-sasl cyrus-sasl-plain ca-certificates} sasl_pkgs = %w{cyrus-sasl cyrus-sasl-plain ca-certificates}
end end
when "fedora" when 'fedora'
sasl_pkgs = %w{cyrus-sasl cyrus-sasl-plain ca-certificates} sasl_pkgs = %w{cyrus-sasl cyrus-sasl-plain ca-certificates}
end end
sasl_pkgs.each do |pkg| sasl_pkgs.each do |pkg|
package pkg package pkg
end end
execute "postmap-sasl_passwd" do execute 'postmap-sasl_passwd' do
command "postmap /etc/postfix/sasl_passwd" command 'postmap /etc/postfix/sasl_passwd'
action :nothing action :nothing
end end
template "/etc/postfix/sasl_passwd" do template '/etc/postfix/sasl_passwd' do
source "sasl_passwd.erb" source 'sasl_passwd.erb'
owner "root" owner 'root'
group "root" group 'root'
mode 0400 mode 0400
notifies :run, "execute[postmap-sasl_passwd]", :immediately notifies :run, 'execute[postmap-sasl_passwd]', :immediately
notifies :restart, "service[postfix]" notifies :restart, 'service[postfix]'
variables(:settings => node['postfix']['sasl']) variables(settings: node['postfix']['sasl'])
end end

View File

@ -1,3 +1,4 @@
# encoding: utf-8
# #
# Author:: Joshua Timberman(<joshua@opscode.com>) # Author:: Joshua Timberman(<joshua@opscode.com>)
# Cookbook Name:: postfix # Cookbook Name:: postfix
@ -21,4 +22,4 @@
node.override['postfix']['mail_type'] = 'master' node.override['postfix']['mail_type'] = 'master'
node.override['postfix']['main']['inet_interfaces'] = 'all' node.override['postfix']['main']['inet_interfaces'] = 'all'
include_recipe "postfix" include_recipe 'postfix'