From 5bbfb4dc1a0c13224215d65f4dd20ae306303b2c Mon Sep 17 00:00:00 2001 From: myvesta <38690722+myvesta@users.noreply.github.com> Date: Sun, 12 Jul 2020 04:52:46 +0200 Subject: [PATCH] PTR dot fix in v-make-separate-ip-for-email --- bin/v-make-separate-ip-for-email | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/v-make-separate-ip-for-email b/bin/v-make-separate-ip-for-email index 0d99ee0cd..0dfc68d7e 100644 --- a/bin/v-make-separate-ip-for-email +++ b/bin/v-make-separate-ip-for-email @@ -139,7 +139,10 @@ fi echo "=== Done!" ptr=$(dig +short -x $MAIL_IP) -if [ "$PTR" != "$MAIL_HOSTNAME." ]; then +ptr_len=${#ptr} +ptr_len=$((ptr_len-1)) +ptr=${ptr:0:ptr_len} +if [ "$PTR" != "$MAIL_HOSTNAME" ]; then echo "" echo "WARNING: PTR for $MAIL_IP is $ptr" echo "WARNING: PTR for $MAIL_IP should be $MAIL_HOSTNAME"