disable and delete all vmail related configs
This commit is contained in:
parent
62c8660680
commit
13b930de0a
|
@ -57,6 +57,29 @@ else
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [ -d "$VMAIL_DIR/$domain" ] ; then
|
||||
/usr/bin/rm -r $VMAIL_DIR/$domain
|
||||
# disable webmail
|
||||
if [[ -f /etc/apache2/sites-available/mail.$domain.conf ]]; then
|
||||
/usr/local/bin/vmail-webmail-disable.sh -d $domain
|
||||
fi
|
||||
|
||||
# remove the dovecot config
|
||||
if [[ -f /etc/dovecot/sites.d/mail.$domain.conf ]]; then
|
||||
/usr/local/bin/vmail-dovecot-disable.sh -d $domain
|
||||
fi
|
||||
|
||||
# remove dkim files
|
||||
if [[ -f /etc/ssl/dkim/$domain.selector ]]; then
|
||||
/usr/local/bin/vmail-dkim-del.sh -d $domain
|
||||
fi
|
||||
|
||||
# remove let's encrypt files
|
||||
if [[ -f /etc/letsencrypt/renewal/mail.$domain.conf ]]; then
|
||||
if [[ -f /usr/local/bin/letsencrypt-del.sh ]]; then
|
||||
/usr/local/bin/letsencrypt-del.sh -d mail.$domain
|
||||
fi
|
||||
fi
|
||||
|
||||
# remove maildirs
|
||||
if [[ -d "$VMAIL_DIR/$domain" ]] ; then
|
||||
/usr/bin/rm --recursive --force $VMAIL_DIR/$domain
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue
Block a user