Re: [Exim] equivilent of lsearch* on mysql/pgsql lookups?

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Peter Galbavy
Dátum:  
Címzett: Jason J. Horton, exim-users
Tárgy: Re: [Exim] equivilent of lsearch* on mysql/pgsql lookups?
The config should look something like this (my postgres quaeries - but mysql
should work the same):

virtual_alias:
  driver = aliasfile
  domains = "pgsql;SELECT domain FROM domains WHERE domain = '$key'"
  ...
  search_type = pgsql
  query = SELECT a.address FROM alias a, lists l, users u WHERE \
        a.alias = '$local_part' AND a.domain = l.domain AND \
        a.domain = u.domain AND a.address = u.account AND \
        a.domain = '$domain' AND \
        u.status = 100 AND a.status = 100 AND l.status = 100


I do a join and check for status etc. but your query could be much simpler.
Note the use of 'query' is orthoganal to 'file'.

Peter

----- Original Message -----
From: "Jason J. Horton" <jason@???>
To: <exim-users@???>
Sent: Tuesday, June 06, 2000 7:44 PM
Subject: [Exim] equivilent of lsearch* on mysql/pgsql lookups?


> Currently I have a director that looks like this:
> virtual_alias:
>    driver = aliasfile
>    domains = lsearch;/mail/conf/domains
>    file = /mail/conf/$domain/aliases
>    file_transport = address_file
>    search_type = lsearch*
>    qualify_preserve_domain

>
> Using it to get different alias files per domain. I am starting
> to get tired of dealing with plain text files and would like to
> stuff everything in a database. Have had good luck replacing passwd
> file queries with sql queries, but seems like I might get stuck on
> the alias files.
>
> --
> -Jason J. Horton <jason@???>
> Fat Man in a Little Coat
> Intercom Online Inc.
> 212.376.7440 | http://www.intercom.com
>
> --
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim

details at http://www.exim.org/ ##
>