Re: [Exim] exim wildcard virtual domain sql

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Nico Erfurth
Datum:  
To: Johnson, Michael
CC: exim-users@exim.org
Betreff: Re: [Exim] exim wildcard virtual domain sql
On Fri, 10 Jan 2003, Johnson, Michael wrote:

> Morning all,
>     I have started migration of my flat files to postgres database.
> Everything is working great so far except my alises for catch all emails
> ie(*@domain.com) When I add this as an alias in the database for the
> username i just put * since my query does where username={localpart} and
> domain = {domainname} i know the query is looking for * and thats probably
> where I am going wrong but how do i do this now that im using sql.


How does your alias-router looks like?
basicly, you can use something like this

mysql_aliases:
  driver = redirect
  data = ${lookup mysql \
   {select addr from t where domain=$domain user=$local_part}\
   {$value}
   {${lookup mysql{select addr from t where domain=$domain and user='*'}\
       {$value}}}
   }


The trick is to do the defaultalias-lookup if the normal-lookup does not
succeed.

BUT you have to do the router for a "real" user BEFORE this router.

ciao