[COOK-2551] Support creating the sender_canonical
map file
Signed-off-by: Seth Vargo <sethvargo@gmail.com>
This commit is contained in:
parent
20a06b9c03
commit
3485a81fab
@ -23,6 +23,7 @@ default['postfix']['use_procmail'] = false
|
||||
default['postfix']['aliases'] = {}
|
||||
default['postfix']['main_template_source'] = "postfix"
|
||||
default['postfix']['master_template_source'] = "postfix"
|
||||
default['postfix']['sender_canonical_map_entries'] = {}
|
||||
|
||||
case node['platform']
|
||||
when 'smartos'
|
||||
|
@ -38,6 +38,19 @@ when "rhel", "fedora"
|
||||
end
|
||||
end
|
||||
|
||||
if !node['postfix']['sender_canonical_map_entries'].empty?
|
||||
template "#{node['postfix']['conf_dir']}/sender_canonical" do
|
||||
owner "root"
|
||||
group 0
|
||||
mode '0644'
|
||||
notifies :restart, "service[postfix]"
|
||||
end
|
||||
|
||||
if !node['postfix']['main'].has_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|
|
||||
template "#{node['postfix']['conf_dir']}/#{cfg}.cf" do
|
||||
source "#{cfg}.cf.erb"
|
||||
|
Loading…
x
Reference in New Issue
Block a user