docker-mailserver/target/bin/delmailuser
Josef Friedrich 69ee54513e Fix build (#286)
The Refactoring of the scripts 'addmailuser' and 'delmailuser'
destroyed the build process.
2016-08-29 07:13:36 +02:00

19 lines
300 B
Bash
Executable file

#!/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
if [ -f "$DATABASE" ]; then
ENTRIES=$(grep "$USER" -vi $DATABASE)
echo "$ENTRIES" > $DATABASE
fi
else
usage
fi