mmv

mailserver bootstrap script
git clone git://git.yotsev.xyz/mmv.git
Log | Files | Refs | README | LICENSE

commit bb38a6d7b1fa7126e6d3258b1d4095572cc7346e
parent 91dc06bbfceb7b6c740f38634336dc7548afc015
Author: Petar Yotsev <petar@yotsev.xyz>
Date:   Wed, 16 Mar 2022 00:58:08 +0000

Fix wording for mdeluser

Diffstat:
Mfiles/mdeluser | 13++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/files/mdeluser b/files/mdeluser @@ -26,16 +26,19 @@ if [ -z "$(grep "^$user@$domain" /etc/mail/virtuals 2> /dev/null)" ]; then return 1 fi -echo -n "Delete records for user \"$user\"? (yes/no): " && +echo -n "Delete user \"$user\"? (y/n): " && read responce && -[ $responce = "yes" ] && +[ $responce = "y" ] && sed "/^$user@$domain/d" /etc/mail/credentials > temp-cred-file && mv temp-cred-file /etc/mail/credentials && sed "/^$user@$domain/d" /etc/mail/virtuals > temp-virt-file && -mv temp-virt-file /etc/mail/virtuals && +mv temp-virt-file /etc/mail/virtuals -echo -n "Delete all mail associated with user \"$user\"? (yes/no): " && +echo -n "Delete all mail belonging to user \"$user\"? (y/n): " && read responce && -[ $responce = "yes" ] && +[ $responce = "y" ] && rm -rf /var/vmail/$domain/$user || return 0 + +rcctl restart smtpd +rcctl restart dovecot