Autor: Hardy Datum: To: exim-users Betreff: Re: [exim] lowest numbered MX record points to local host
A simple solution may be to read the
domainlist local_domains =
from a flat file that needs to hold the names of the user defined
domains, and keep BOTH routers in their original configuration.
On 14.02.2018 10:28, Cyborg via Exim-users wrote: > Am 14.02.2018 um 09:59 schrieb Bambero via Exim-users:
>> 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.
>>
>
> There is no easy solution to the problem. Local domains defines those
> domains, the server shall receive email for.
>
> You could add a rule to the check_rcpt acl , to see, if IN MX of the
> domain points to your server. It's doable,
> but could be tricked also.
>
> Way easier is to blacklist domains, you will never serve emails for like
> gmail.com.
>
> domainlist local_domains = @ : localhost : localhost.localdomain :
> ${lookup mysql { SELECT domainname FROM .. WHERE ... AND DOMAIN NOT IN
> ( "gmail.com","t-online.de","gmx.de","gmx.net","outlook.com" .... ) }}
>
> You could also build an sql with a db defined blacklist, which would be
> easier to maintain.
>
> Hope that helped,
> Marius
>