domain.com
and domain.net
are hosted on one and the same server server1
. To avoid SPAM and viruses all outgoing emails (even to local domains) are subjects to scan with a 3rd party service. Thus email from mail@domain.com
to mail@domain.net
should leave the server1
, then it will be checked outside the server1
, and then be delivered according to its MX record to server1
, from which it was originated.
And here we end with a loop: Too many "Received" headers - suspected mail loop
.
And here is what I have:
smarthost_relay:
driver = manualroute
ignore_target_hosts = 127.0.0.0/8
condition = ${if !inlist{$sender_host_address}{<; 46.xxx.xxx.xxx }}
condition = ${if or {{!eq{$sender_address}{}} {!eq{$sender_host_address}{}}}}
condition = '${perl{check_limits}}'
transport = auth_relay
route_list = $domain 46.xxx.xxx.xxx::587
same_domain_copy_routing = yes
no_more
The $sender_host_address
does not work here as I'd expected. As it's empty when an email arrives after a remote check. What do I miss? How to accomplish it?
Regards, Alex.