Exim/commands/exim_userdel.sh

14 lines
255 B
Bash
Raw Permalink 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
service exim4 reload