DirectAdmin官方论坛解决方案
Thanks for your advices, I have put this lines into exim.conf and it works now:
local_interfaces = a.a.a.a : b.b.b.b : c.c.c.c : d.d.d.d
smtp_active_hostname = ${lookup{$interface_address}lsearch{/etc/virtual/smtp_active_hostnames}{$value}}
smtp_banner = "$smtp_active_hostname ESMTP $tod_full"
create new file smtp_active_hostname with ip: hostname compare for every domain and ip address
remote_smtp:
driver = smtp
interface = "${lookup{$sender_address_domain}lsearch{/etc/virtual/domainips}{$value}}"
helo_data = "mail.$sender_address_domain"
and create file domainips with domain: ip address compare for every domain and ip address
cPanel官方解决方案
==========================================
/etc/exim.pl
sub randinet {
@inet = ("x.x.x.1", "x.x.x.2", "x.x.x.3", "x.x.x.4");
return $inet[int rand($#inet+1)];
}
查找 "interface="
remote_smtp:
driver = smtp
interface = ${if exists {/etc/mailips}{${lookup{$sender_address_domain}lsearch*{/etc/mailips}{$value}{}}}{}}
替换为
interface = "{perl{randinet}}"
列表模式
================================
|
echo "#!/bin/sh IP="$(ifconfig | egrep 'inet ' | sed -e 's/inet //' -e 's/addr://' -e 's/ Bcast.*//' -e 's/127.*//')" echo $IP">getip.sh bash getip.sh touch /etc/exim/ips.txt echo "1: xxx.xxx.xxx.1 2: xxx.xxx.xxx.2 3: xxx.xxx.xxx.3 4: xxx.xxx.xxx.4">/etc/exim/ips.txt 替换为 interface = "${lookup {{randint:5}} lsearch {/etc/exim/ips.txt}}" |