mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-04 18:15:29 +02:00
move addmailuser, delmailuser to target/bin
This commit is contained in:
parent
7c63d00d77
commit
94679df291
3 changed files with 1 additions and 1 deletions
16
target/bin/delmailuser
Executable file
16
target/bin/delmailuser
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
DATABASE=/tmp/docker-mailserver/postfix-accounts.cf
|
||||
|
||||
function usage {
|
||||
echo "Usage: delmailuser <user@domain.tld>"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ ! -z "$1" ]; then
|
||||
USER=$1
|
||||
ENTRIES=$(grep "$USER" -vi $DATABASE)
|
||||
echo "$ENTRIES" > $DATABASE
|
||||
else
|
||||
usage
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue