From 7a0d18fc81d0177f8037ff8f550c9c5e79d5828c Mon Sep 17 00:00:00 2001 From: myvesta <38690722+myvesta@users.noreply.github.com> Date: Sun, 12 Jul 2020 04:45:09 +0200 Subject: [PATCH] PTR check in v-make-separate-ip-for-email --- bin/v-make-separate-ip-for-email | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bin/v-make-separate-ip-for-email b/bin/v-make-separate-ip-for-email index 6654b9688..1e0134639 100644 --- a/bin/v-make-separate-ip-for-email +++ b/bin/v-make-separate-ip-for-email @@ -137,3 +137,10 @@ if [ "$check_grep" -eq 0 ]; then fi echo "=== Done!" + +ptr=$(dig +short -x $MAIL_IP) +if [ "$PTR" != "$MAIL_HOSTNAME" ]; then + echo "" + echo "WARNING: PTR for $MAIL_IP is $ptr" + echo "WARNING: PTR for $MAIL_IP should be $MAIL_HOSTNAME" +fi