Re: [Exim] Getting Local Domains from mySQL

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Jose de Paula Eufrasio Junior
Date:  
À: Nico Erfurth
CC: Lista Exim
Sujet: Re: [Exim] Getting Local Domains from mySQL
On Mon, 2003-01-13 at 21:24, Nico Erfurth wrote:
> 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?
>


Yep... there's no "alias" field on the domain table, and if I include
the domain_alias table in the list of tables to select from it returns
that domain_name is ambiguous. :\

The max I get was a listing with all my domain names in a row. :\

> > 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 ;)


Yeah, but a lot of people in exim list got to be using a DB scheme, so I
think that somebody has to be that query working... :)

thanks

core