[COOK-4619] - no way to unset recipient_delimiter

Signed-off-by: Sean OMeara <someara@opscode.com>
This commit is contained in:
Patrick Moore
2014-05-09 13:51:12 -04:00
committed by Sean OMeara
parent f27480fa4c
commit 0a42b0722b
14 changed files with 78 additions and 68 deletions

View File

@@ -18,7 +18,7 @@ include_recipe 'postfix'
execute 'update-postfix-aliases' do
command 'newaliases'
environment :PATH => "#{ENV['PATH']}:/opt/omni/bin:/opt/omni/sbin" if platform_family?('omnios')
environment PATH: "#{ENV['PATH']}:/opt/omni/bin:/opt/omni/sbin" if platform_family?('omnios')
action :nothing
end

View File

@@ -25,7 +25,7 @@ end
query = "role:#{node['postfix']['relayhost_role']}"
relayhost = ''
results = []
# results = []
if node.run_list.roles.include?(node['postfix']['relayhost_role'])
relayhost << node['ipaddress']

View File

@@ -20,9 +20,7 @@
package 'postfix'
if node['postfix']['use_procmail']
package 'procmail'
end
package 'procmail' if node['postfix']['use_procmail']
case node['platform_family']
when 'rhel', 'fedora'
@@ -37,7 +35,7 @@ when 'rhel', 'fedora'
not_if '/usr/bin/test /etc/alternatives/mta -ef /usr/sbin/sendmail.postfix'
end
when 'omnios'
manifest_path = ::File.join(Chef::Config[:file_cache_path], "manifest-postfix.xml")
manifest_path = ::File.join(Chef::Config[:file_cache_path], 'manifest-postfix.xml')
# we need to manage the postfix group and user
# and then subscribe to the package install because it creates a
@@ -62,13 +60,13 @@ when 'omnios'
owner 'root'
group 'root'
mode 00644
notifies :run, "execute[load postfix manifest]", :immediately
notifies :run, 'execute[load postfix manifest]', :immediately
end
execute "load postfix manifest" do
execute 'load postfix manifest' do
action :nothing
command "svccfg import #{manifest_path}"
notifies :restart, "service[postfix]"
notifies :restart, 'service[postfix]'
end
end
@@ -77,21 +75,21 @@ execute 'update-postfix-sender_canonical' do
action :nothing
end
if !node['postfix']['sender_canonical_map_entries'].empty?
unless node['postfix']['sender_canonical_map_entries'].empty?
template "#{node['postfix']['conf_dir']}/sender_canonical" do
owner 'root'
group 0
mode '0644'
mode '0644'
notifies :run, 'execute[update-postfix-sender_canonical]'
notifies :reload, 'service[postfix]'
end
if !node['postfix']['main'].key?('sender_canonical_maps')
unless node['postfix']['main'].key?('sender_canonical_maps')
node.set['postfix']['main']['sender_canonical_maps'] = "hash:#{node['postfix']['conf_dir']}/sender_canonical"
end
end
%w{main master}.each do |cfg|
%w(main master).each do |cfg|
template "#{node['postfix']['conf_dir']}/#{cfg}.cf" do
source "#{cfg}.cf.erb"
owner 'root'

View File

@@ -27,15 +27,15 @@ sasl_pkgs = []
# version specifics for RHEL.
case node['platform_family']
when 'debian'
sasl_pkgs = %w{libsasl2-2 libsasl2-modules ca-certificates}
sasl_pkgs = %w(libsasl2-2 libsasl2-modules ca-certificates)
when 'rhel'
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
sasl_pkgs = %w{cyrus-sasl cyrus-sasl-plain ca-certificates}
sasl_pkgs = %w(cyrus-sasl cyrus-sasl-plain ca-certificates)
end
when 'fedora'
sasl_pkgs = %w{cyrus-sasl cyrus-sasl-plain ca-certificates}
sasl_pkgs = %w(cyrus-sasl cyrus-sasl-plain ca-certificates)
end
sasl_pkgs.each do |pkg|
@@ -55,5 +55,5 @@ template node['postfix']['sasl_password_file'] do
mode 0400
notifies :run, 'execute[postmap-sasl_passwd]', :immediately
notifies :restart, 'service[postfix]'
variables(:settings => node['postfix']['sasl'])
variables(settings: node['postfix']['sasl'])
end