Exim/commands/exim_forwarddel.sh
2016-10-07 19:47:43 +02:00

11 lines
225 B
Bash

#!/usr/bin/env bash
echo "Forward FROM email: "
read emailfrom
echo "Forward TO email: "
read emailto
DIR=/etc/exim4/forward
sed -i "s/$emailto,//g" "$DIR/$emailfrom"
[[ ! -s "$DIR/$emailfrom" ]] && rm -f "$DIR/$emailfrom"