[exim] Connect to multiple PostgreSQL databases

Page principale
Supprimer ce message
Répondre à ce message
Auteur: D. Dante Lorenso
Date:  
À: exim-users
Sujet: [exim] Connect to multiple PostgreSQL databases

I have my domain information spread across multiple databases for
different domains. I would like to use just one Exim mail server to
handle the domains.

Is it possible to configure Exim to use a different database connection
based on a domain lookup ... Something like the domain found in a RCPT
TO address?

I tried something like this:

hide pgsql_servers = ${lookup {$domain}\
    nwildlsearch{/etc/exim/domain_db_map.txt}}


Where the /etc/exim/domain_db_map.txt file looks like this:

^domain1\.com$ : db1.domain.com/eximdb/username/password
^domain2\.com$ : db2.domain.com/eximdb/username/password
^domain3\.com$ : db3.domain.com/eximdb/username/password
* : db4.domain.com/eximdb/username/password

That's not working. Can this be done?

-- Dante