Ensure all postmap files are rebuilt immediately if needed
This fixes a race condition where postmap files are updated but not generated to .db files before postfix has been started or restarted. By running these immediately on updates, this ensures that the .db files exist properly. Signed-off-by: Lance Albertson <lance@osuosl.org>
This commit is contained in:
parent
7ab1360d4a
commit
d93caa21b6
@ -5,6 +5,10 @@ This file is used to list changes made in each version of the postfix cookbook.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
|
||||||
|
- Ensure all postmap files are rebuilt immediately if needed
|
||||||
|
|
||||||
## 5.4.0 - 2020-10-11
|
## 5.4.0 - 2020-10-11
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
@ -131,7 +131,7 @@ unless node['postfix']['sender_canonical_map_entries'].empty?
|
|||||||
owner 'root'
|
owner 'root'
|
||||||
group node['root_group']
|
group node['root_group']
|
||||||
mode '0644'
|
mode '0644'
|
||||||
notifies :run, 'execute[update-postfix-sender_canonical]'
|
notifies :run, 'execute[update-postfix-sender_canonical]', :immediately
|
||||||
notifies :reload, 'service[postfix]'
|
notifies :reload, 'service[postfix]'
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -148,7 +148,7 @@ unless node['postfix']['smtp_generic_map_entries'].empty?
|
|||||||
owner 'root'
|
owner 'root'
|
||||||
group node['root_group']
|
group node['root_group']
|
||||||
mode '0644'
|
mode '0644'
|
||||||
notifies :run, 'execute[update-postfix-smtp_generic]'
|
notifies :run, 'execute[update-postfix-smtp_generic]', :immediately
|
||||||
notifies :reload, 'service[postfix]'
|
notifies :reload, 'service[postfix]'
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -165,7 +165,7 @@ unless node['postfix']['recipient_canonical_map_entries'].empty?
|
|||||||
owner 'root'
|
owner 'root'
|
||||||
group node['root_group']
|
group node['root_group']
|
||||||
mode '0644'
|
mode '0644'
|
||||||
notifies :run, 'execute[update-postfix-recipient_canonical]'
|
notifies :run, 'execute[update-postfix-recipient_canonical]', :immediately
|
||||||
notifies :reload, 'service[postfix]'
|
notifies :reload, 'service[postfix]'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -23,5 +23,5 @@ end
|
|||||||
|
|
||||||
template node['postfix']['access_db'] do
|
template node['postfix']['access_db'] do
|
||||||
source 'access.erb'
|
source 'access.erb'
|
||||||
notifies :run, 'execute[update-postfix-access]'
|
notifies :run, 'execute[update-postfix-access]', :immediately
|
||||||
end
|
end
|
||||||
|
@ -25,5 +25,5 @@ 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]', :immediately
|
||||||
end
|
end
|
||||||
|
@ -25,5 +25,5 @@ end
|
|||||||
|
|
||||||
template node['postfix']['relay_restrictions_db'] do
|
template node['postfix']['relay_restrictions_db'] do
|
||||||
source 'relay_restrictions.erb'
|
source 'relay_restrictions.erb'
|
||||||
notifies :run, 'execute[update-postfix-relay-restrictions]'
|
notifies :run, 'execute[update-postfix-relay-restrictions]', :immediately
|
||||||
end
|
end
|
||||||
|
@ -25,5 +25,5 @@ end
|
|||||||
|
|
||||||
template node['postfix']['transport_db'] do
|
template node['postfix']['transport_db'] do
|
||||||
source 'transport.erb'
|
source 'transport.erb'
|
||||||
notifies :run, 'execute[update-postfix-transport]'
|
notifies :run, 'execute[update-postfix-transport]', :immediately
|
||||||
end
|
end
|
||||||
|
@ -23,6 +23,6 @@ end
|
|||||||
|
|
||||||
template node['postfix']['virtual_alias_db'] do
|
template node['postfix']['virtual_alias_db'] do
|
||||||
source 'virtual_aliases.erb'
|
source 'virtual_aliases.erb'
|
||||||
notifies :run, 'execute[update-postfix-virtual-alias]'
|
notifies :run, 'execute[update-postfix-virtual-alias]', :immediately
|
||||||
notifies :restart, 'service[postfix]'
|
notifies :restart, 'service[postfix]'
|
||||||
end
|
end
|
||||||
|
@ -23,6 +23,6 @@ end
|
|||||||
|
|
||||||
template node['postfix']['virtual_alias_domains_db'] do
|
template node['postfix']['virtual_alias_domains_db'] do
|
||||||
source 'virtual_aliases_domains.erb'
|
source 'virtual_aliases_domains.erb'
|
||||||
notifies :run, 'execute[update-postfix-virtual-alias-domains]'
|
notifies :run, 'execute[update-postfix-virtual-alias-domains]', :immediately
|
||||||
notifies :restart, 'service[postfix]'
|
notifies :restart, 'service[postfix]'
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user