Skip to content

Commit 2f73044

Browse files
authored
Wrong order of steps in v-change-domain-owner, fixed
1 parent a2dab6c commit 2f73044

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

bin/v-change-domain-owner

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

147+
# Rebuild config
148+
$BIN/v-unsuspend-mail-domain $user $domain no >> /dev/null 2>&1
149+
$BIN/v-rebuild-mail-domains $owner no
150+
$BIN/v-rebuild-mail-domains $user
151+
147152
# Checking exim username for later chowning
148153
exim_user="exim";
149154
check_exim_username=$(grep -c '^Debian-exim:' /etc/passwd)
@@ -155,11 +160,6 @@ if [ ! -z "$mail_data" ]; then
155160
find $HOMEDIR/$user/conf/mail/$domain -user root \
156161
-exec chown $exim_user {} \;
157162
fi
158-
159-
# Rebuild config
160-
$BIN/v-unsuspend-mail-domain $user $domain no >> /dev/null 2>&1
161-
$BIN/v-rebuild-mail-domains $owner no
162-
$BIN/v-rebuild-mail-domains $user
163163
fi
164164

165165
# Update counters

0 commit comments

Comments
 (0)