[exim-dev] domainlist/manualroute from 3.36 broken in 4.60 w…

Top Page
Delete this message
Reply to this message
Author: Derrick Rice
Date:  
To: exim-dev
Subject: [exim-dev] domainlist/manualroute from 3.36 broken in 4.60 with no know solution
All,

I am responsible for some servers running exim and these servers were
recently upgraded from 3.36 to 4.60. I had created a router using the
domainlist driver that had the following properties, which I migrated
to a manualroute router which does not work, and I see no way to
recreate it:

1) for any recipient, try to send the email to a relay server that is
more capable of handling email that the local exim.
2) if that is not accepted or is not available*, try to send the email
directly to the recipient.
3) if delivery is temporarily denied, defer the message so that it
goes through this process again - passing to another router does not
do this.

This worked well in 3.36, but in 4.60 the driver is different: the
list of hosts in the route_list is more strict. In 4.60 it will not
use the MX record of a host if it does not have an A record. In order
to use the host, it must have an A record (or the host specifies
`host/mx', it must have an MX record). In 3.36 it would prefer the MX
record and automatically fall back to the A record.

For both versions, if any of the hosts in the route_list does not
exist, the mail is handled via the host_find_failed option. In these
versions, there is no host_find_failed=ignore (introduced in 4.67).
For 3.36 this is OK: mail will be deferred if either the relay doesn't
resolve (won't happen) or if the recipient address doesn't resolve to
an MX or A (it's invalid entirely). In 4.60 host_find_failed is
invoked if the recipient doesn't resolve to an A record (or MX record
if /mx is used) -- there are *valid* recipient addresses that have
this property.

What I need is a way in 4.60 to get this behavior back, such that
email will be routed if the recipient address domain resolves to
either MX or A, but not necessarily both. It should be routed to the
relay first, if possible, which will always resolve. Failing that
(due to connectivity, etc), it should try the recipient address --
ideally MX first then A. If the email cannot be delivered for
temporary failures, it should be defered and go through this process
again.

Below is my router in 3.36, 4.60, and what I would want in 4.67 if it
were available to me. I hope someone can suggest an alternative for
4.60 that creates this behavior. Am I using the wrong driver?

Much appreciation and thanks -
Derrick Rice

PS. if anyone cares, this is somewhat urgent and I need to find a
solution or change our system in today's work day. I just hate it
when people mark emails for help with URGENT!!



ROUTERS....

3.36

relay_then_lookup:
driver = domainlist
route_list = * myrelay.foo.com:$domain bydns
transport = remote_smtp
host_find_failed = defer
# deferred if $domain has neither an A or MX record

4.60

relay_then_lookup:
driver = manualroute
route_list = * myrelay.foo.com:$domain bydns
transport = remote_smtp
host_find_failed = defer
# deferred if $domain didn't resolve to A, even if it has an MX
# vice versa if I use $domain/mx
# must have both MX and A if I use $domain/mx:$domain

4.67 --- This is the behavior I want, but do not have 4.67 available

relay_then_lookup:
driver = manualroute
route_list = * myrelay.foo.com:$domain/mx:$domain bydns
transport = remote_smtp
host_find_failed = ignore
host_all_ignored = defer




TEST OUTPUT 3.36...

# exim -bV
Exim version 3.36

# exim -bP routers

relay_then_lookup router:
condition =
debug_print =
domains =
driver = domainlist
errors_to =
no_fail_verify_recipient
no_fail_verify_sender
fallback_hosts =
group =
headers_add =
headers_remove =
ignore_target_hosts =
no_initgroups
local_parts =
more
no_pass_on_timeout
require_files =
self = freeze
senders =
transport = remote_smtp
no_unseen
user =
no_verify_only
verify_recipient
verify_sender
host_find_failed = defer
no_hosts_randomize
modemask = 022
owners =
owngroups =
qualify_single
route_file =
route_list = * myrelay.foo.com:$domain bydns
route_queries =
route_query =
no_search_parents
search_type =

# exim -bt foo@???
foo@???
  deliver to foo@???
  router = relay_then_lookup, transport = remote_smtp
  host mx1.myrelay.foo.com [172.23.253.37] MX=100
  host mx2.myrelay.foo.com [172.17.50.20]  MX=100
  host mx3.myrelay.foo.com [172.23.253.93] MX=100
  host mx4.myrelay.foo.com [172.17.50.21]  MX=100
  host mx1.only.mx.com          [72.246.196.67] MX=9
  host mx2.only.mx.com          [72.246.7.208]  MX=9
  host mx3.only.mx.com          [72.246.7.56]   MX=9
  host mx4.only.mx.com          [72.246.7.169]  MX=9
  host mx5.only.mx.com          [72.246.7.19]   MX=9
  host mx6.only.mx.com          [72.246.7.53]   MX=9
  host mx7.only.mx.com          [72.246.7.148]  MX=9
  host mx8.only.mx.com          [72.246.7.59]   MX=9


# exim -bt foo@???
foo@???
  deliver to foo@???
  router = relay_then_lookup, transport = remote_smtp
  host mx1.myrelay.foo.com [172.23.253.37] MX=100
  host mx2.myrelay.foo.com [172.17.50.20]  MX=100
  host mx3.myrelay.foo.com [172.23.253.93] MX=100
  host mx4.myrelay.foo.com [172.17.50.21]  MX=100
  host only.a.com              [172.17.96.12]





TEST OUTPUT 4.60...

# exim -bV
Exim version 4.60

# exim -bt routers
relay_then_lookup router:
address_data =
address_test
cannot_route_message =
no_caseful_local_part
no_check_local_user
condition =
debug_print =
no_disable_logging
domains =
driver = manualroute
errors_to =
expn
no_fail_verify_recipient
no_fail_verify_sender
fallback_hosts =
group =
headers_add =
headers_remove =
ignore_target_hosts =
no_initgroups
local_part_prefix =
no_local_part_prefix_optional
local_part_suffix =
no_local_part_suffix_optional
local_parts =
no_log_as_local
more
no_pass_on_timeout
pass_router =
redirect_router =
require_files =
no_retry_use_local_part
router_home_directory =
self = freeze
senders =
transport = remote_smtp
transport_current_directory =
transport_home_directory =
no_unseen
user =
no_verify_only
verify_recipient
verify_sender
host_find_failed = defer
no_hosts_randomize
route_data =
route_list = * myrelay.foo.com:$domain bydns
no_same_domain_copy_routing

#exim -bt foo@???
foo@??? cannot be resolved at this time:
lookup of host "only.mx.com" failed in relay_then_lookup router

# exim -bt foo@???
foo@???
router = relay_then_lookup, transport = remote_smtp
host myrelay.foo.com [172.23.253.37]
host myrelay.foo.com [172.17.50.21]
host myrelay.foo.com [172.17.50.20]
host myrelay.foo.com [172.23.253.93]
host only.a.com [172.17.96.12]

# host only.mx.com
only.mx.com mail is handled by 9 cname.only.mx.net