Exim/commands/exim_userdel.sh

13 lines
230 B
Bash
Raw Normal View History

2016-10-05 22:40:56 +00:00
#!/usr/bin/env bash
echo "Username: "
read username
echo "Domain: "
read domain
2016-10-07 09:15:13 +00:00
DIR=/etc/exim4/domains
sed -i "/$username/d" "$DIR/$domain"
[[ ! -s $DIR/$domain ]] && rm -f $DIR/$domain
2016-10-05 22:40:56 +00:00
userdb "$username@$domain" del
makeuserdb