Re: [Exim] local domains from mysql db

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Phil Pennock
Dátum:  
Címzett: exim-users
Tárgy: Re: [Exim] local domains from mysql db
On 2002-03-23 at 17:18 -0000, Gareth Down wrote:
> .. that works fine, but the local domains setting:
>
> local_domains = "mysql; select domain_name from domains;"
>
> causes exim to think that *every* domain name is a local domain, obviously
> causing major problems.


+-----+-------------------+
 | foo | domain_name       |

+-----+-------------------+
 |   1 | example.org       |
 |   2 | fred.invalid      |
 |   3 | foo.bar.example   |

+-----+-------------------+

"select domain_name from domains;" will return how many rows from this
little database?

Hint: answer != 1

Try an SQL example to restrict the number of rows, using some data from
the mail, which you're trying to look up.

Eg: select domain_name from domains where domain_name = $domain;
(or somesuch; I don't actually use SQL and Exim together).

There are probably ways to optimise this.
--
The Tao that is seen
Is not the true Tao, until
You bring fresh toner.