#!/bin/bash DATABASE=/tmp/docker-mailserver/postfix-accounts.cf function usage { echo "Usage: delmailuser " exit 1 } if [ ! -z "$1" ]; then USER=$1 if [ -f "$DATABASE" ]; then ENTRIES=$(grep "$USER" -vi $DATABASE) echo "$ENTRIES" > $DATABASE fi else usage fi