Re: [Exim] recipients_reject_except & Mysql

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: David Saez Padros
Dátum:  
Címzett: exim-users
Tárgy: Re: [Exim] recipients_reject_except & Mysql
Hi !!

> > when doing a mysql query for recipients_reject_except the value of
> > $key is the domain instead of the recipient (?). It would be useful to
> > restrict the query like this:
> >
> > select email from norbl where email='$key'
> >
> > where $key is the recipient instead of doing a query that returns
> > a lot of records which exim must allocate and search for recipients.
>
> 1. I don't fully understand the problem, because I don't know how you've
> set up MySQL (and I'm not a MySQL users anyway).


The problem is that if I just set:

recipients_reject_except = mysql;select email from norbl

this query could return lots of email addresses (I mean LOTS), that means that
exim has to check every email returned by the query, which slows exim operation,
where it would be more efficient to do:

recipients_reject_except = mysql;select email from norbl where email='$key'

but $key seems to be the domain of the recipient instead the recipient address
(maybe $key is not set at all and it just has a value used in a previous search)

> 2. I'm not making any functional changes to Exim 3, and it is all
> different in Exim 4. You should have access to $local_part and $domain
> at the equivalent point in Exim 4.


It would be enough if $key is set to be the recipient address.

> 3. If you have something along the lines of
>
> recipients_reject_except = mysql;select ....
>
> (in other words, something that does not start with "user@") Exim will
> indeed check the domain on its own first. But if that fails, it should
> repeat the lookup on the complete address.


Do you mean that it will do two queries on recipients_reject_except, one
with $key=domain and another one with $key=email@??? ??

--
Best regardas ...

----------------------------------------------------------------
     David Saez Padros                  e-mail  david@???
     On-Line Services 2000 S.L.         
     Trafalgar 78 2º 2ª B               voice   +34 93 315 15 93
     08010 Barcelona (Spain)            movil   +34 670 35 27 53      
     http://www.ols.es                  fax     +34 93 268 35 90
     http://www.ols.es/~david/   
----------------------------------------------------------------