|
|
@@ -65,10 +65,6 @@ else
|
|
|
get_user_ip
|
|
|
fi
|
|
|
|
|
|
-# Generating list of mail domains for HELO
|
|
|
-ls /etc/exim4/domains > /etc/exim4/mailhelo.conf
|
|
|
-sed -i "s \(.*\) \1:\1 " /etc/exim4/mailhelo.conf
|
|
|
-
|
|
|
# Generating timestamp
|
|
|
new_timestamp
|
|
|
|
|
|
@@ -105,6 +101,18 @@ if [[ "$MAIL_SYSTEM" =~ exim ]]; then
|
|
|
echo "$local_ip" > $HOMEDIR/$user/conf/mail/$domain/ip
|
|
|
fi
|
|
|
|
|
|
+ # Setting HELO for mail domain
|
|
|
+ if [ ! -z "$local_ip" ]; then
|
|
|
+ IP_RDNS=$(is_ip_rdns_valid "$local_ip")
|
|
|
+ if [ ! -z "$IP_RDNS" ]; then
|
|
|
+ if [ $(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
|
|
|
+ fi
|
|
|
+ fi
|
|
|
+
|
|
|
# Adding antispam protection
|
|
|
if [ "$antispam" = 'yes' ]; then
|
|
|
touch $HOMEDIR/$user/conf/mail/$domain/antispam
|