Re: [Exim] Getting Local Domains from mySQL

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Nico Erfurth
Data:  
Para: Jose de Paula Eufrasio Junior
CC: Lista Exim
Assunto: Re: [Exim] Getting Local Domains from mySQL
Jose de Paula Eufrasio Junior wrote:
>
> Heya people...
>
> I'm using a modified version of the vmail-sql databases, and just now I
> noted that the local_domain query doesn't get the domain aliases... for
> knowing, the DB scheme (just the important fields)
>
> table domain:
>     field domain_name -> contains the domain name :)

>
> table domain_alias:
>     field alias -> contains the alias of the domain.
>     field domain_name -> contains the domain being aliased (that exists in
> the 'domain_name' field of the 'domain' table

>
> example:
>
> domain lasca-pinga.com exists in domain.domain_name
> and
> alias lascapinga.com points to lasca-pinga.com
>
> the exim.conf contains:
>
> domainlist local_domains = ${lookup mysql{select domain_name \
>         from domain where domain_name = '$domain'}}


domainlist local_domains = mysql;select 1 from domain where \
                              domain_name = '$domain' or alias = 'domain'


Tried this yet?

> and if I try to send a mail to a alias domain, this query doesn't return
> it as a local domain and I get a "Relay Denied"
>
> Somebody can help me with the query?


But this is more mysql related ;)

ciao