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
|
\e[94mCOMMAND\e[39m email \e[31m:=\e[39m
|
||||||
${0} email add <EMAIL ADDRESS> [<PASSWORD>]
|
${0} email add <EMAIL ADDRESS> [<PASSWORD>]
|
||||||
${0} email update <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 restrict <add\e[31m|\e[39mdel\e[31m|\e[39mlist> <send\e[31m|\e[39mreceive> [<EMAIL ADDRESS>]
|
||||||
${0} email list
|
${0} email list
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ function __usage
|
||||||
delmailuser - delete a user and related data
|
delmailuser - delete a user and related data
|
||||||
|
|
||||||
\e[38;5;214mSYNOPSIS\e[39m
|
\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
|
\e[38;5;214mDESCRIPTION\e[39m
|
||||||
Delete a mail user, aliases, quotas and mail data.
|
Delete a mail user, aliases, quotas and mail data.
|
||||||
|
@ -38,7 +38,7 @@ function __usage
|
||||||
Delete the mail user, quotas and aliases, but ask
|
Delete the mail user, quotas and aliases, but ask
|
||||||
again whether mailbox data should be deleted.
|
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
|
Delete all mail data for the users 'test' and do not
|
||||||
prompt to ask if all mail data should be deleted.
|
prompt to ask if all mail data should be deleted.
|
||||||
|
|
||||||
|
@ -89,8 +89,9 @@ fi
|
||||||
(
|
(
|
||||||
flock -e 200
|
flock -e 200
|
||||||
|
|
||||||
|
for EMAIL in "${@}"
|
||||||
|
do
|
||||||
ERROR=false
|
ERROR=false
|
||||||
EMAIL="${*}"
|
|
||||||
|
|
||||||
# very simple plausibility check
|
# very simple plausibility check
|
||||||
[[ ${EMAIL} != *@*.* ]] && errex "No valid address: ${EMAIL}"
|
[[ ${EMAIL} != *@*.* ]] && errex "No valid address: ${EMAIL}"
|
||||||
|
@ -158,6 +159,7 @@ use 'sudo docker exec mailserver rm -R /var/mail/${DOMAIN}/${USER}'"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
${ERROR} && errex 'See the messages above.'
|
${ERROR} && errex 'See the messages above.'
|
||||||
|
done
|
||||||
|
|
||||||
) 200< "${DATABASE}"
|
) 200< "${DATABASE}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue