فهرست منبع

Merge pull request #1023 from Lupul/1022_vrebuilduser

Simplify mailhelo.conf rebuilding/cleanup
Kristan Kenney 5 سال پیش
والد
کامیت
3ca4827c31
1فایلهای تغییر یافته به همراه2 افزوده شده و 7 حذف شده
  1. 2 7
      func/rebuild.sh

+ 2 - 7
func/rebuild.sh

@@ -527,14 +527,9 @@ rebuild_mail_domain_conf() {
         # Setting HELO for mail domain
         if [ ! -z "$local_ip" ]; then
             IP_RDNS=$(is_ip_rdns_valid "$local_ip")
+            sed -i "/^${domain}:/d" /etc/exim4/mailhelo.conf >/dev/null 2>&1
             if [ ! -z "$IP_RDNS" ]; then
-                if [ -f /etc/exim4/mailhelo.conf ] && [ $(grep -s "^${domain}:" /etc/exim4/mailhelo.conf) ]; then
-                    sed -i "/^${domain}:/c\\${domain}:${IP_RDNS}" /etc/exim4/mailhelo.conf
-                else
-                    echo ${domain}:${IP_RDNS} >> /etc/exim4/mailhelo.conf
-                fi
-            else
-                sed -i "/^${domain}:/d" /etc/exim4/mailhelo.conf >/dev/null 2>&1
+                echo ${domain}:${IP_RDNS} >> /etc/exim4/mailhelo.conf
             fi
         fi