Exim/commands/exim_userdel.sh
2016-10-07 11:15:13 +02:00

13 lines
230 B
Bash

#!/usr/bin/env bash
echo "Username: "
read username
echo "Domain: "
read domain
DIR=/etc/exim4/domains
sed -i "/$username/d" "$DIR/$domain"
[[ ! -s $DIR/$domain ]] && rm -f $DIR/$domain
userdb "$username@$domain" del
makeuserdb