Skip to content

Commit 419a9b0

Browse files
authored
Fix for DKIM key permission in v-change-domain-owner
Fix is the same as for v-restore-backup - outroll/vesta@7815539
1 parent 8844f50 commit 419a9b0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

bin/v-change-domain-owner

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,16 @@ if [ ! -z "$mail_data" ]; then
144144
find $HOMEDIR/$user/mail/$domain -user $owner \
145145
-exec chown -h $user {} \;
146146

147+
# Checking exim username for later chowning
148+
exim_user="exim";
149+
check_exim_username=$(grep -c '^Debian-exim:' /etc/passwd)
150+
if [ "$check_exim_username" -eq 1 ]; then
151+
exim_user="Debian-exim"
152+
fi
153+
# Chowning mail conf files to exim user
154+
find $HOMEDIR/$user/conf/mail/$domain_idn -user root \
155+
-exec chown $exim_user {} \;
156+
147157
# Rebuild config
148158
$BIN/v-unsuspend-mail-domain $user $domain no >> /dev/null 2>&1
149159
$BIN/v-rebuild-mail-domains $owner no

0 commit comments

Comments
 (0)