update command line

This commit is contained in:
Michel Roux 2016-10-07 11:15:13 +02:00
parent d1cef6f149
commit 6016eb13be
5 changed files with 18 additions and 3 deletions

View File

@ -5,4 +5,5 @@ read emailfrom
echo "Forward TO email: "
read emailto
echo "$(cat /etc/exim4/forward/$emailfrom)$emailto," > "/etc/exim4/forward/$emailfrom"
DIR=/etc/exim4/forward
echo "$(cat $DIR/$emailfrom)$emailto," > "$DIR/$emailfrom"

View File

@ -5,4 +5,6 @@ read emailfrom
echo "Forward TO email: "
read emailto
sed -i "s/$emailto,//g" "/etc/exim4/forward/$emailfrom"
DIR=/etc/exim4/forward
sed -i "s/$emailto,//g" "$DIR/$emailfrom"
[[ ! -s $DIR/$emailfrom ]] && rm -f $DIR/$emailfrom

View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
DIR=/etc/exim4/forward
for file in $DIR/*
do
echo "$file: $(cat $DIR/$file)"
done

View File

@ -5,6 +5,8 @@ read username
echo "Domain: "
read domain
sed "/$username/d" "/etc/exim4/domains/$domain"
DIR=/etc/exim4/domains
sed -i "/$username/d" "$DIR/$domain"
[[ ! -s $DIR/$domain ]] && rm -f $DIR/$domain
userdb "$username@$domain" del
makeuserdb

View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
userdb -show