docker-mailserver/target/delmailuser

16 lines
241 B
Plaintext
Raw Normal View History

2016-06-14 11:16:11 +00:00
#!/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