So what shoud I do to fix that? I can't use local_domains, becouse it's
shared hosting, and users can add domains by hand.
If someone will add domain 'gmail.com' exim will treat it as local domain.
The only way is to check MX.
Regards,
Bambero
On Wed, Feb 14, 2018 at 9:29 AM, Bambero <bambero@???> wrote:
> So what shoud I do to fix that? I can't use local_domains, becouse it's
> shared hosting, and users can add domains by hand.
> If someone will add domain 'gmail.com' exim will treat it as local domain.
>
> The only way is to check MX.
>
> Regards,
> Bambero
>
> On Wed, Feb 14, 2018 at 8:04 AM, Sebastian Nielsen <
> nielsen.sebastian@???> wrote:
>
>> 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@???>:
>>
>> 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/
>>
>>
>>
>