0

I have defined a router for an autoreply for a domain to send a message back to the sender that the domain will be deleted.

The goal: every sender who sends email to whatever@aaa.com should receive a mail with a message that the aaa.com is going to be deleted.

Here is my relevant config:

domainlist relay_to_domains = /etc/exim/domains

    begin routers


    vacation_router:
  driver = redirect
  data = ${lookup{$domain}lsearch{/etc/exim/domains}}
  domains = +relay_to_domains : sig.hu
  reply_transport = vacation_transport
  no_more


begin transports


vacation_transport:
  driver = autoreply
  to = ${reply_address}
  from = ${local_part}@${domain}
  subject = Re: $h_subject:
  text = "autoreply"

The /etc/exim/domains contains:

g@aaa.com
*@aaa.com

I have tested the routing for g@aaa.com

Address testing: uid=0 gid=93 euid=0 egid=93
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Testing g@aaa.com
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Considering g@aaa.com
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
routing g@aaa.com
--------> vacation_router router <--------
local_part=g domain=aaa.com
checking domains
aaa.com in "/etc/exim/domains"? no (end of list)
aaa.com in "+relay_to_domains : aaa.com"? yes (matched "aaa.com")
calling vacation_router router
rda_interpret (string): ${lookup{$domain}lsearch{/etc/exim/domains}}
search_open: lsearch "/etc/exim/domains"
search_find: file="/etc/exim/domains"
  key="aaa.com" partial=-1 affix=NULL starflags=0
LRU list:
  :/etc/exim/domains
  End
internal_search_find: file="/etc/exim/domains"
  type=lsearch key="aaa.com"
file lookup required for aaa.com
  in /etc/exim/domains
lookup failed
expanded:
file is not a filter file
parse_forward_list:
vacation_router router declined for g@aaa.com
"more" is false: skipping remaining routers
no more routers
g@aaa.com is undeliverable: Unrouteable address
search_tidyup called
>>>>>>>>>>>>>>>> Exim pid=59959 (main) terminating with rc=2 >>>>>>>>>>>>>>>>

Why is it declined? Why not match if the relay_to_domains match? What can be the solution? The documentation was not helpful at all.

Thank you for your help, Peter

repi
  • 11
  • 2

1 Answers1

0

Try content of file /etc/exim/domains like this (add : yes):

g@aaa.com: yes
nowildcard@aaa.com: yes

If you want to use wildcard: *@aaa.com then do not use lsearch, but try nwildlsearch or other types for searching wildcards

There is one example source Make exim Deliver Local Mail Externally

kenlukas
  • 2,886
  • 2
  • 14
  • 25
yyy
  • 1