mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-20 13:24:24 -07:00
Merge 7121b8a875
into 873693b2ed
This commit is contained in:
commit
bdad7b4e95
3 changed files with 20 additions and 3 deletions
|
@ -109,7 +109,12 @@ if [[ "$MAIL_SYSTEM" =~ exim ]]; then
|
|||
|
||||
# Set ownership
|
||||
chown -R $MAIL_USER:mail $HOMEDIR/$user/conf/mail/$domain
|
||||
chown -R dovecot:mail $HOMEDIR/$user/conf/mail/$domain/passwd
|
||||
# Checking if dovecot user exists before set dovecot as owner. If dovecot user doesn't exist (dovecot is not installed), owner is assign to Exim user
|
||||
if id "dovecot" >/dev/null 2>&1; then
|
||||
chown -R dovecot:mail $HOMEDIR/$user/conf/mail/$domain/passwd
|
||||
else
|
||||
chown -R $MAIL_USER:mail $HOMEDIR/$user/conf/mail/$domain/passwd
|
||||
fi
|
||||
chown $user:mail $HOMEDIR/$user/mail/$domain_idn
|
||||
fi
|
||||
|
||||
|
|
|
@ -526,7 +526,13 @@ rebuild_mail_domain_conf() {
|
|||
chmod 771 /etc/$MAIL_SYSTEM/domains/$domain_idn
|
||||
chmod 770 $HOMEDIR/$user/mail/$domain_idn
|
||||
chown -R $MAIL_USER:mail $HOMEDIR/$user/conf/mail/$domain
|
||||
chown -R dovecot:mail $HOMEDIR/$user/conf/mail/$domain/passwd
|
||||
|
||||
# Checking if dovecot user exists before set dovecot as owner. If dovecot user doesn't exist (dovecot is not installed), owner is assign to Exim user
|
||||
if id "dovecot" >/dev/null 2>&1; then
|
||||
chown -R dovecot:mail $HOMEDIR/$user/conf/mail/$domain/passwd
|
||||
else
|
||||
chown -R $MAIL_USER:mail $HOMEDIR/$user/conf/mail/$domain/passwd
|
||||
fi
|
||||
chown $user:mail $HOMEDIR/$user/mail/$domain_idn
|
||||
fi
|
||||
|
||||
|
|
|
@ -5,7 +5,13 @@ if [ -e "/etc/exim4/domains/" ]; then
|
|||
domain_link=$(readlink /etc/exim4/domains/$domain)
|
||||
chown Debian-exim:mail $domain_link
|
||||
chown Debian-exim:mail /etc/exim4/domains/$domain/*
|
||||
chown dovecot:mail /etc/exim4/domains/$domain/passwd
|
||||
|
||||
# Checking if dovecot user exists before set dovecot as owner. If dovecot user doesn't exist (dovecot is not installed), owner is assign to Exim user
|
||||
if id "dovecot" >/dev/null 2>&1; then
|
||||
chown -R dovecot:mail /etc/exim4/domains/$domain/passwd
|
||||
else
|
||||
chown -R $MAIL_USER:mail /etc/exim4/domains/$domain/passwd
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue