On Tue, 16 Apr 2013 at 18:02 +0100, F. Mendez wrote
## at begin routers added the following bellow lookuphost:
^^^^^^
This might be your problem. Routers are run in order and the first one
that matches is used. The default lookuphost router would probably match
all your domains.
Run exim -bt [email protected] and see which router is matching. If
lookuphost has matched then put your two routers *before* lookuphost and
see if that solves the problem.
If the correct router is matching send an email on the command line using
exim -d and it should show the lookups for interface and helo_data
expansion so you can see what has and has not matched. You also might try
exim -bem to test string expansion with a dummy message (I think you need
this to get $original_domain etc. set).
We use different outgoing interfaces for different sender domains but the
lookup is much simpler. I'm not certain why you have $original_domain and
$sender_address_domain in your lookup - the first is from the recipient
and the second the sender.
We have (line breaks for email readability)
interface =
${lookup{$sender_address_domain}lsearch{TABLES/interfaces}
{$value}{138.250.48.78}}
helo_data =
${lookup{$sending_ip_address}lsearch{TABLES/mailhelo}
{$value}{mailgate-1.central.cranfield.ac.uk}}
Finally your traffic_route1 router says use the transport called
smtp_route1 but the transport you quoted is called smtp_traffic_route1.
traffic_route1:
driver = dnslookup
domains = +traffic_route1
transport = smtp_route1 <----------
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
retry_use_local_part
no_more
smtp_traffic_route1: <--------
driver = smtp
interface = ${if exists
{/etc/mailips}{${lookup{$original_domain}lsearch{/etc/mailips}{$value}{${lookup{$sender_address_domain}lsearch{/etc/mailips}{$value}{${lookup{${perl{get_sender_from_uid}}}lsearch*{/etc/mailips}{$value}{}}}}}}}}
helo_data = ${if exists
{/etc/mailhelo}{${lookup{$original_domain}lsearch{/etc/mailhelo}{$value}{${lookup{$sender_address_domain}lsearch{/etc/mailhelo}{$value}{${lookup{${perl{get_sender_from_uid}}}lsearch*{/etc/mailhelo}{$value}{$primary_hostname}}}}}}}{$primary_hostname}}
hosts_max_try = 5
hosts_max_try_hardlimit = 7
multi_domain = true
connection_max_messages = 20
max_rcpt = 20
# batch_max = 100
serialize_hosts = *
# ratelimit = 600 / 1h / strict
retry_use_local_part
--
------------------------------------------------------------------------------
J. R. Haynes
Senior Network Specialist
IT Department, e-mail: [email protected]
Bld 63,
Cranfield University, Tel: Bedford (01234) 754205
Wharley End, Bedford (01234) 750111 Extn 4205
Cranfield, Fax: Bedford (01234) 751814
Beds.,
MK43 0AL.
--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/