Fix FreeBSD isms in Postfix.
This commit is contained in:
@@ -60,7 +60,7 @@ when 'omnios'
|
||||
template manifest_path do
|
||||
source 'manifest-postfix.xml.erb'
|
||||
owner 'root'
|
||||
group 'root'
|
||||
group node['root_group']
|
||||
mode '0644'
|
||||
notifies :run, 'execute[load postfix manifest]', :immediately
|
||||
end
|
||||
@@ -80,7 +80,7 @@ end
|
||||
unless node['postfix']['sender_canonical_map_entries'].empty?
|
||||
template "#{node['postfix']['conf_dir']}/sender_canonical" do
|
||||
owner 'root'
|
||||
group 0
|
||||
group node['root_group']
|
||||
mode '0644'
|
||||
notifies :run, 'execute[update-postfix-sender_canonical]'
|
||||
notifies :reload, 'service[postfix]'
|
||||
@@ -99,7 +99,7 @@ end
|
||||
unless node['postfix']['smtp_generic_map_entries'].empty?
|
||||
template "#{node['postfix']['conf_dir']}/smtp_generic" do
|
||||
owner 'root'
|
||||
group 0
|
||||
group node['root_group']
|
||||
mode '0644'
|
||||
notifies :run, 'execute[update-postfix-smtp_generic]'
|
||||
notifies :reload, 'service[postfix]'
|
||||
@@ -114,7 +114,7 @@ end
|
||||
template "#{node['postfix']['conf_dir']}/#{cfg}.cf" do
|
||||
source "#{cfg}.cf.erb"
|
||||
owner 'root'
|
||||
group 0
|
||||
group node['root_group']
|
||||
mode '0644'
|
||||
notifies :restart, 'service[postfix]'
|
||||
variables(settings: node['postfix'][cfg])
|
||||
|
||||
@@ -19,6 +19,8 @@ include_recipe 'postfix::_common'
|
||||
execute 'update-postfix-aliases' do
|
||||
command 'newaliases'
|
||||
environment PATH: "#{ENV['PATH']}:/opt/omni/bin:/opt/omni/sbin" if platform_family?('omnios')
|
||||
# On FreeBSD, /usr/sbin/newaliases is the sendmail command, and it's in the path before postfix's /usr/local/bin/newaliases
|
||||
environment ({ "PATH" => "/usr/local/bin:#{ENV['PATH']}" }) if platform_family?('freebsd')
|
||||
action :nothing
|
||||
end
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ end
|
||||
template node['postfix']['sasl_password_file'] do
|
||||
source 'sasl_passwd.erb'
|
||||
owner 'root'
|
||||
group 'root'
|
||||
group node['root_group']
|
||||
mode 0400
|
||||
notifies :run, 'execute[postmap-sasl_passwd]', :immediately
|
||||
notifies :restart, 'service[postfix]'
|
||||
|
||||
Reference in New Issue
Block a user