[COOK-4322]: Fix the default path for the sasl_passwd file
Signed-off-by: Sean OMeara <someara@opscode.com>
This commit is contained in:
parent
761fe139e0
commit
14fc7d7919
@ -79,7 +79,8 @@ if node['postfix']['main']['smtp_use_tls'] == 'yes'
|
||||
end
|
||||
|
||||
if node['postfix']['main']['smtp_sasl_auth_enable'] == 'yes'
|
||||
default['postfix']['main']['smtp_sasl_password_maps'] = "hash:#{node['postfix']['conf_dir']}/postfix/sasl_passwd"
|
||||
default['postfix']['sasl_password_file'] = "#{node['postfix']['conf_dir']}/sasl_passwd"
|
||||
default['postfix']['main']['smtp_sasl_password_maps'] = "hash:#{node['postfix']['sasl_password_file']}"
|
||||
default['postfix']['main']['smtp_sasl_security_options'] = 'noanonymous'
|
||||
default['postfix']['sasl']['smtp_sasl_user_name'] = ''
|
||||
default['postfix']['sasl']['smtp_sasl_passwd'] = ''
|
||||
|
@ -22,4 +22,8 @@ describe 'postfix::sasl_auth' do
|
||||
file('/etc/postfix/sasl_passwd').must_match(/^# This file is generated by Chef for/)
|
||||
end
|
||||
|
||||
it 'configures postfix to use /etc/postfix/sasl_passwd' do
|
||||
file('/etc/postfix/main.cf').must_match(/^\s*smtp_sasl_password_maps\s*=.*\/etc\/postfix\/sasl_passwd\s*$/)
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -43,11 +43,11 @@ sasl_pkgs.each do |pkg|
|
||||
end
|
||||
|
||||
execute 'postmap-sasl_passwd' do
|
||||
command 'postmap /etc/postfix/sasl_passwd'
|
||||
command "postmap #{node['postfix']['sasl_password_file']}"
|
||||
action :nothing
|
||||
end
|
||||
|
||||
template '/etc/postfix/sasl_passwd' do
|
||||
template node['postfix']['sasl_password_file'] do
|
||||
source 'sasl_passwd.erb'
|
||||
owner 'root'
|
||||
group 'root'
|
||||
|
Loading…
x
Reference in New Issue
Block a user