mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-03 09:34:33 +02:00
* Ensure that the provided username actually contains a domain * Update README.md to be consistent with addmailuser script * Add a test to check if the username includes the domain
This commit is contained in:
parent
7015d09404
commit
137d623171
3 changed files with 7 additions and 1 deletions
|
@ -19,6 +19,7 @@ escape() {
|
|||
}
|
||||
|
||||
[ -z "$USER" ] && { usage; errex "no username specified"; }
|
||||
expr index "$USER" "@" >/dev/null || { usage; errex "username must include the domain"; }
|
||||
|
||||
grep -qi "^$(escape "$USER")|" $DATABASE 2>/dev/null &&
|
||||
errex "User \"$USER\" already exists"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue