Commit 03384208 authored by Natanael Copa's avatar Natanael Copa

setup-mta: cleanup. use ask

parent e5c17c73
......@@ -33,13 +33,11 @@ fi
res=
while [ "$res" != "221" ]; do
echon "Outgoing mail server? (e.g 'smtp.isp.com') [$mailhub] "
default_read mailhub $mailhub
echon "Test connection? (y/n) [y] "
default_read testconn "y"
case "$testconn" in
[Nn]*) break;;
esac
ask "Outgoing mail server? (e.g 'smtp.isp.com')" "$mailhub"
mailhub="$resp"
if ! ask_yesno "Test connection? (y/n)" y; then
break
fi
res=$(echo -e "quit\r\n" | nc $mailhub 25 | awk '/^221/ {print $1}')
[ "x$res" = "x221" ] && echo "Connection to $mailhub is ok."
done
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment