Because exim4 by default disallows delivery to local host to prevent mail
loops.

When remote delivery fails, delivery will be attempted to a local user.
Thats why it doesn't fail with a valid user.

The ! +local_domains skips this router for local users, so remote delivery
isn't even attempted for local users.


Den 14 feb. 2018 02:48 skrev "Bambero via Exim-users" <exim-users@exim.org>:

Hi,

I have two routers:

dnslookup:
  driver = dnslookup
#  domains = ! +local_domains # check mx for all domains
  transport = remote_smtp
  ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
  self = pass
  no_more

localuser:
  driver = accept
  condition = ${lookup sqlite {...}{yes}{no}}
  transport = local_delivery
  cannot_route_message = Unknown user

Everything works fine, but if there is no user in my database i got error:
"lowest numbered MX record points to local host"

Instead of:
"Unknown user"

But when i change first router to defaults:

dnslookup:
  driver = dnslookup
  domains = ! +local_domains
  transport = remote_smtp
  ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
  no_more

The error is correct:
"Unknown user"

Can anyone explain, why?

Regards,
Bambero
--
## 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/
-- 
## 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/

Reply via email to