Cookstyle fixes
Signed-off-by: Tim Smith <tsmith@chef.io>
This commit is contained in:
parent
5428c4f171
commit
684b407157
@ -383,24 +383,22 @@ default['postfix']['master']['bsmtp']['args'] = ['flags=Fq. user=foo argv=/usr/l
|
|||||||
default['postfix']['aliases'] = case node['platform']
|
default['postfix']['aliases'] = case node['platform']
|
||||||
when 'freebsd'
|
when 'freebsd'
|
||||||
{
|
{
|
||||||
'MAILER-DAEMON' => 'postmaster',
|
'MAILER-DAEMON' => 'postmaster',
|
||||||
'bin' => 'root',
|
'bin' => 'root',
|
||||||
'daemon' => 'root',
|
'daemon' => 'root',
|
||||||
'named' => 'root',
|
'named' => 'root',
|
||||||
'nobody' => 'root',
|
'nobody' => 'root',
|
||||||
'uucp' => 'root',
|
'uucp' => 'root',
|
||||||
'www' => 'root',
|
'www' => 'root',
|
||||||
'ftp-bugs' => 'root',
|
'ftp-bugs' => 'root',
|
||||||
'postfix' => 'root',
|
'postfix' => 'root',
|
||||||
'manager' => 'root',
|
'manager' => 'root',
|
||||||
'dumper' => 'root',
|
'dumper' => 'root',
|
||||||
'operator' => 'root',
|
'operator' => 'root',
|
||||||
'abuse' => 'postmaster',
|
'abuse' => 'postmaster',
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{}
|
{}
|
||||||
end
|
end
|
||||||
|
|
||||||
if node['postfix']['use_relay_restrictions_maps']
|
default['postfix']['main']['smtpd_relay_restrictions'] = "hash:#{node['postfix']['relay_restrictions_db']}, reject" if node['postfix']['use_relay_restrictions_maps']
|
||||||
default['postfix']['main']['smtpd_relay_restrictions'] = "hash:#{node['postfix']['relay_restrictions_db']}, reject"
|
|
||||||
end
|
|
||||||
|
|||||||
@ -13,9 +13,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
if node['postfix']['use_procmail']
|
node.default_unless['postfix']['main']['mailbox_command'] = '/usr/bin/procmail -a "$EXTENSION"' if node['postfix']['use_procmail']
|
||||||
node.default_unless['postfix']['main']['mailbox_command'] = '/usr/bin/procmail -a "$EXTENSION"'
|
|
||||||
end
|
|
||||||
|
|
||||||
if node['postfix']['main']['smtpd_use_tls'] == 'yes'
|
if node['postfix']['main']['smtpd_use_tls'] == 'yes'
|
||||||
node.default_unless['postfix']['main']['smtpd_tls_cert_file'] = '/etc/ssl/certs/ssl-cert-snakeoil.pem'
|
node.default_unless['postfix']['main']['smtpd_tls_cert_file'] = '/etc/ssl/certs/ssl-cert-snakeoil.pem'
|
||||||
@ -38,34 +36,18 @@ if node['postfix']['main']['smtp_sasl_auth_enable'] == 'yes'
|
|||||||
node.default_unless['postfix']['main']['relayhost'] = ''
|
node.default_unless['postfix']['main']['relayhost'] = ''
|
||||||
end
|
end
|
||||||
|
|
||||||
if node['postfix']['use_alias_maps']
|
node.default_unless['postfix']['main']['alias_maps'] = ["hash:#{node['postfix']['aliases_db']}"] if node['postfix']['use_alias_maps']
|
||||||
node.default_unless['postfix']['main']['alias_maps'] = ["hash:#{node['postfix']['aliases_db']}"]
|
|
||||||
end
|
|
||||||
|
|
||||||
if node['postfix']['use_transport_maps']
|
node.default_unless['postfix']['main']['transport_maps'] = ["hash:#{node['postfix']['transport_db']}"] if node['postfix']['use_transport_maps']
|
||||||
node.default_unless['postfix']['main']['transport_maps'] = ["hash:#{node['postfix']['transport_db']}"]
|
|
||||||
end
|
|
||||||
|
|
||||||
if node['postfix']['use_access_maps']
|
node.default_unless['postfix']['main']['access_maps'] = ["hash:#{node['postfix']['access_db']}"] if node['postfix']['use_access_maps']
|
||||||
node.default_unless['postfix']['main']['access_maps'] = ["hash:#{node['postfix']['access_db']}"]
|
|
||||||
end
|
|
||||||
|
|
||||||
if node['postfix']['use_virtual_aliases']
|
node.default_unless['postfix']['main']['virtual_alias_maps'] = ["#{node['postfix']['virtual_alias_db_type']}:#{node['postfix']['virtual_alias_db']}"] if node['postfix']['use_virtual_aliases']
|
||||||
node.default_unless['postfix']['main']['virtual_alias_maps'] = ["#{node['postfix']['virtual_alias_db_type']}:#{node['postfix']['virtual_alias_db']}"]
|
|
||||||
end
|
|
||||||
|
|
||||||
if node['postfix']['use_virtual_aliases_domains']
|
node.default_unless['postfix']['main']['virtual_alias_domains'] = ["#{node['postfix']['virtual_alias_domains_db_type']}:#{node['postfix']['virtual_alias_domains_db']}"] if node['postfix']['use_virtual_aliases_domains']
|
||||||
node.default_unless['postfix']['main']['virtual_alias_domains'] = ["#{node['postfix']['virtual_alias_domains_db_type']}:#{node['postfix']['virtual_alias_domains_db']}"]
|
|
||||||
end
|
|
||||||
|
|
||||||
if node['postfix']['use_relay_restrictions_maps']
|
node.default_unless['postfix']['main']['smtpd_relay_restrictions'] = "hash:#{node['postfix']['relay_restrictions_db']}, reject" if node['postfix']['use_relay_restrictions_maps']
|
||||||
node.default_unless['postfix']['main']['smtpd_relay_restrictions'] = "hash:#{node['postfix']['relay_restrictions_db']}, reject"
|
|
||||||
end
|
|
||||||
|
|
||||||
if node['postfix']['master']['maildrop']['active']
|
node.default_unless['postfix']['main']['maildrop_destination_recipient_limit'] = 1 if node['postfix']['master']['maildrop']['active']
|
||||||
node.default_unless['postfix']['main']['maildrop_destination_recipient_limit'] = 1
|
|
||||||
end
|
|
||||||
|
|
||||||
if node['postfix']['master']['cyrus']['active']
|
node.default_unless['postfix']['main']['cyrus_destination_recipient_limit'] = 1 if node['postfix']['master']['cyrus']['active']
|
||||||
node.default_unless['postfix']['main']['cyrus_destination_recipient_limit'] = 1
|
|
||||||
end
|
|
||||||
|
|||||||
@ -126,9 +126,7 @@ unless node['postfix']['sender_canonical_map_entries'].empty?
|
|||||||
notifies :reload, 'service[postfix]'
|
notifies :reload, 'service[postfix]'
|
||||||
end
|
end
|
||||||
|
|
||||||
unless node['postfix']['main'].key?('sender_canonical_maps')
|
node.normal['postfix']['main']['sender_canonical_maps'] = "hash:#{node['postfix']['conf_dir']}/sender_canonical" unless node['postfix']['main'].key?('sender_canonical_maps')
|
||||||
node.normal['postfix']['main']['sender_canonical_maps'] = "hash:#{node['postfix']['conf_dir']}/sender_canonical"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
execute 'update-postfix-smtp_generic' do
|
execute 'update-postfix-smtp_generic' do
|
||||||
@ -145,9 +143,7 @@ unless node['postfix']['smtp_generic_map_entries'].empty?
|
|||||||
notifies :reload, 'service[postfix]'
|
notifies :reload, 'service[postfix]'
|
||||||
end
|
end
|
||||||
|
|
||||||
unless node['postfix']['main'].key?('smtp_generic_maps')
|
node.normal['postfix']['main']['smtp_generic_maps'] = "hash:#{node['postfix']['conf_dir']}/smtp_generic" unless node['postfix']['main'].key?('smtp_generic_maps')
|
||||||
node.normal['postfix']['main']['smtp_generic_maps'] = "hash:#{node['postfix']['conf_dir']}/smtp_generic"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
execute 'update-postfix-recipient_canonical' do
|
execute 'update-postfix-recipient_canonical' do
|
||||||
@ -164,9 +160,7 @@ unless node['postfix']['recipient_canonical_map_entries'].empty?
|
|||||||
notifies :reload, 'service[postfix]'
|
notifies :reload, 'service[postfix]'
|
||||||
end
|
end
|
||||||
|
|
||||||
unless node['postfix']['main'].key?('recipient_canonical_maps')
|
node.normal['postfix']['main']['recipient_canonical_maps'] = "hash:#{node['postfix']['conf_dir']}/recipient_canonical" unless node['postfix']['main'].key?('recipient_canonical_maps')
|
||||||
node.normal['postfix']['main']['recipient_canonical_maps'] = "hash:#{node['postfix']['conf_dir']}/recipient_canonical"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
%w( main master ).each do |cfg|
|
%w( main master ).each do |cfg|
|
||||||
|
|||||||
@ -38,9 +38,7 @@ node['postfix']['maps'].each do |type, maps|
|
|||||||
map: content,
|
map: content,
|
||||||
separator: separator
|
separator: separator
|
||||||
)
|
)
|
||||||
if %w(btree cdb dbm hash sdbm).include?(type)
|
notifies :run, "execute[update-postmap-#{file}]" if %w(btree cdb dbm hash sdbm).include?(type)
|
||||||
notifies :run, "execute[update-postmap-#{file}]"
|
|
||||||
end
|
|
||||||
notifies :restart, 'service[postfix]'
|
notifies :restart, 'service[postfix]'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user