Fix for DKIM key permission in v-change-domain-owner

Fix is the same as for v-restore-backup - 7815539e91
This commit is contained in:
dpeca 2017-01-10 12:43:28 +01:00 committed by GitHub
commit 419a9b0b1a

View file

@ -144,6 +144,16 @@ if [ ! -z "$mail_data" ]; then
find $HOMEDIR/$user/mail/$domain -user $owner \
-exec chown -h $user {} \;
# Checking exim username for later chowning
exim_user="exim";
check_exim_username=$(grep -c '^Debian-exim:' /etc/passwd)
if [ "$check_exim_username" -eq 1 ]; then
exim_user="Debian-exim"
fi
# Chowning mail conf files to exim user
find $HOMEDIR/$user/conf/mail/$domain_idn -user root \
-exec chown $exim_user {} \;
# Rebuild config
$BIN/v-unsuspend-mail-domain $user $domain no >> /dev/null 2>&1
$BIN/v-rebuild-mail-domains $owner no