Update install-postfix.sh

This commit is contained in:
2023-09-09 21:44:47 -05:00
parent 489eb29149
commit 482b809252

View File

@@ -79,7 +79,9 @@ case "$choice" in
elif [ "${TESTEMAIL}" = "mms" ]; then
TESTEMAIL='9208839613@mms.att.net'
fi
echo "Received from: $(hostname) ($(hostname -f))" | mail -r ${pffromemail}@scity.us -s "Test Message (Postfix Install)" $TESTEMAIL
[ "$(ip route | awk '/default/ { print $5 }')" == "link" ] && HIP=$(ip addr show $(ip route | awk '/1 dev eth0/ { print $5 }') | grep "inet" | head -n 1 | awk '/inet/ {print $2}' | cut -d'/' -f1) ||
HIP=$(ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | head -n 1 | awk '/inet/ {print $2}' | cut -d'/' -f1)
echo "Received from: $(hostname) {$(hostname -f [${HIP}]}" | mail -r ${pffromemail}@scity.us -s "Test Message (Postfix Install)" $TESTEMAIL
fi
echo ""