Fix OpenSUSE installation issues

OpenSUSE runs a script which builds the main.cf file automatically if a file
doesn't exist. This breaks idempotency so go ahead and touch the file via Chef.

In addition, postfix is built with incorrect default settings for `setgid_group`
and `daemon_directory`, so set it properly in the config.

Signed-off-by: Lance Albertson <lance@osuosl.org>
This commit is contained in:
Lance Albertson
2020-10-11 10:44:22 -07:00
parent 3727f97797
commit 7208c3f559
3 changed files with 6 additions and 0 deletions

View File

@@ -105,6 +105,9 @@ when 'rhel'
default['postfix']['cafile'] = '/etc/pki/tls/cert.pem'
when 'amazon'
default['postfix']['cafile'] = '/etc/pki/tls/cert.pem'
when 'suse'
default['postfix']['main']['setgid_group'] = 'maildrop'
default['postfix']['main']['daemon_directory'] = '/usr/lib/postfix/bin'
else
default['postfix']['cafile'] = "#{node['postfix']['conf_dir']}/cacert.pem"
end