docker-mailserver/target/delmailuser
2016-06-14 13:16:11 +02:00

16 lines
241 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
ENTRIES=$(grep "$USER" -vi $DATABASE)
echo $ENTRIES > $DATABASE
else
usage
fi