postfix: move postmap to post regenconf, because the postfix user must be able to access the file, and cant anymore during pre because we moved the pending regenconf folder elsewhere

This commit is contained in:
Alexandre Aubin 2022-01-03 20:14:36 +01:00
parent e12a0153bb
commit 620da53fe7

View file

@ -42,7 +42,6 @@ do_pre_regen() {
chown postfix ${pending_dir}/etc/postfix/sasl_passwd chown postfix ${pending_dir}/etc/postfix/sasl_passwd
cat <<<"[${relay_host}]:${relay_port} ${relay_user}:${relay_password}" >${postfix_dir}/sasl_passwd cat <<<"[${relay_host}]:${relay_port} ${relay_user}:${relay_password}" >${postfix_dir}/sasl_passwd
postmap ${postfix_dir}/sasl_passwd
fi fi
export main_domain export main_domain
export domain_list="$YNH_DOMAINS" export domain_list="$YNH_DOMAINS"
@ -71,6 +70,7 @@ do_post_regen() {
if [ -e /etc/postfix/sasl_passwd ]; then if [ -e /etc/postfix/sasl_passwd ]; then
chmod 750 /etc/postfix/sasl_passwd* chmod 750 /etc/postfix/sasl_passwd*
chown postfix:root /etc/postfix/sasl_passwd* chown postfix:root /etc/postfix/sasl_passwd*
postmap /etc/postfix/sasl_passwd
fi fi
[[ -z "$regen_conf_files" ]] \ [[ -z "$regen_conf_files" ]] \