# Exim test configuration 0205

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

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

domainlist local_domains = test.ex : \
    testhack.test.ex : \
    testhack2.test.ex

percent_hack_domains = testhack.test.ex : \
    testhack2.test.ex


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

begin routers

fail_remote_domains:
  driver = redirect
  domains = ! +local_domains
  allow_fail
  data = :fail: unrouteable mail domain "$domain"

redirect:
  driver = redirect
  local_parts = redirect
  errors_to = postmaster@test.ex
  data = redirected%test.ex@testhack.test.ex
  address_data = $address_data-redirect

local_domains:
  driver = accept
  transport = local_delivery


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

begin transports

local_delivery:
  driver = appendfile
  file = DIR/test-mail/$local_part
  user = CALLER
  headers_add = Address-Data: >$address_data<


# End