# Exim test configuration 3207

exim_path = EXIM_PATH
host_lookup_order = bydns
primary_hostname = myhost.test.ex
qualify_domain = test.ex
spool_directory = DIR/spool
log_file_path = DIR/spool/log/%slog
gecos_pattern = ""
gecos_name = CALLER_NAME

# ----- Main settings -----


domainlist local_domains = test.ex : ^d\d\.ex


# ----- Routers -----

begin routers

r1:
  driver = manualroute
  domains = !^d : !r2.ex : !r3.ex : !r4.ex : testdb;defer
  route_list = * V4NET.0.0.0 byname
  transport = smtp

r2:
  driver = manualroute
  caseful_local_part
  domains = r2.ex
  local_parts = testdb;defer
  route_list = * V4NET.0.0.0 byname
  transport = smtp

r3:
  driver = manualroute
  condition = ${lookup testdb{defer}{yes}{no}}
  domains = r3.ex
  route_list = * V4NET.0.0.0 byname
  transport = smtp

r4:
  driver = manualroute
  domains = ! +local_domains
  route_list = * V4NET.0.0.0 byname
  senders = testdb;defer
  transport = smtp

d1:
  driver = accept
  domains = !d2.ex : !d3.ex : !d4.ex : testdb;defer
  retry_use_local_part
  transport = local_delivery

d2:
  driver = accept
  domains = d2.ex
  local_parts = testdb;defer
  retry_use_local_part
  transport = local_delivery

d3:
  driver = accept
  condition = ${lookup testdb{defer}{yes}{no}}
  domains = d3.ex
  retry_use_local_part
  transport = local_delivery

d4:
  driver = accept
  retry_use_local_part
  senders = testdb;defer
  transport = local_delivery


# ----- Transports -----

begin transports

local_delivery:
  driver = appendfile
  envelope_to_add
  file = DIR/test-mail/$local_part
  user = CALLER

smtp:
  driver = smtp


# ----- Retry -----


begin retry

* * F,1h,10m


# End