We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8844f50 commit 419a9b0Copy full SHA for 419a9b0
bin/v-change-domain-owner
@@ -144,6 +144,16 @@ if [ ! -z "$mail_data" ]; then
144
find $HOMEDIR/$user/mail/$domain -user $owner \
145
-exec chown -h $user {} \;
146
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
+
157
# Rebuild config
158
$BIN/v-unsuspend-mail-domain $user $domain no >> /dev/null 2>&1
159
$BIN/v-rebuild-mail-domains $owner no
0 commit comments