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"
|
2016-10-10 14:26:24 +00:00
|
|
|
[[ ! -s "$DIR/$domain" ]] && rm -f "$DIR/$domain"
|
2016-10-05 22:40:56 +00:00
|
|
|
userdb "$username@$domain" del
|
|
|
|
makeuserdb
|