mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
parent
359696cba9
commit
bc5bc51c02
2
setup.sh
2
setup.sh
|
@ -162,7 +162,7 @@ function _usage
|
|||
\e[94mCOMMAND\e[39m email \e[31m:=\e[39m
|
||||
${0} email add <EMAIL ADDRESS> [<PASSWORD>]
|
||||
${0} email update <EMAIL ADDRESS> [<PASSWORD>]
|
||||
${0} email del [ OPTIONS\e[31m...\e[39m ] <EMAIL ADDRESS>
|
||||
${0} email del [ OPTIONS\e[31m...\e[39m ] <EMAIL ADDRESS> [ <EMAIL ADDRESS>\e[31m...\e[39m ]
|
||||
${0} email restrict <add\e[31m|\e[39mdel\e[31m|\e[39mlist> <send\e[31m|\e[39mreceive> [<EMAIL ADDRESS>]
|
||||
${0} email list
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ function __usage
|
|||
delmailuser - delete a user and related data
|
||||
|
||||
\e[38;5;214mSYNOPSIS\e[39m
|
||||
./setup.sh email del [ OPTIONS ] { <MAIL ADDRESS> \e[31m|\e[39m help }
|
||||
./setup.sh email del [ OPTIONS ] { <MAIL ADDRESS> [<MAIL ADDRESS>\e[31m...\e[39m] \e[31m|\e[39m help }
|
||||
|
||||
\e[38;5;214mDESCRIPTION\e[39m
|
||||
Delete a mail user, aliases, quotas and mail data.
|
||||
|
@ -38,7 +38,7 @@ function __usage
|
|||
Delete the mail user, quotas and aliases, but ask
|
||||
again whether mailbox data should be deleted.
|
||||
|
||||
\e[37m./setup.sh email del -y test@domain.com\e[39m
|
||||
\e[37m./setup.sh email del -y test@domain.com test@domain.com\e[39m
|
||||
Delete all mail data for the users 'test' and do not
|
||||
prompt to ask if all mail data should be deleted.
|
||||
|
||||
|
@ -89,8 +89,9 @@ fi
|
|||
(
|
||||
flock -e 200
|
||||
|
||||
for EMAIL in "${@}"
|
||||
do
|
||||
ERROR=false
|
||||
EMAIL="${*}"
|
||||
|
||||
# very simple plausibility check
|
||||
[[ ${EMAIL} != *@*.* ]] && errex "No valid address: ${EMAIL}"
|
||||
|
@ -158,6 +159,7 @@ use 'sudo docker exec mailserver rm -R /var/mail/${DOMAIN}/${USER}'"
|
|||
fi
|
||||
|
||||
${ERROR} && errex 'See the messages above.'
|
||||
done
|
||||
|
||||
) 200< "${DATABASE}"
|
||||
|
||||
|
|
Loading…
Reference in a new issue