Re: [Exim] Postgresql and Virtual Email

Top Page
Delete this message
Reply to this message
Author: Joachim Wieland
Date:  
To: exim
Subject: Re: [Exim] Postgresql and Virtual Email
Hi,

On Wed, Mar 27, 2002 at 04:10:02PM -0500, Brian C. Doyle wrote:
> Would anybody be able to tell me what I need to do to get EXIM's configure
> to query a pgsql database. I have the db setup and can grant the mail the
> permissions to query but have not clue how to get EXIM to execute the query


Would you please read spec.txt first, then try a few things and tell us
what exactly didn't work out?

See if Postgres support is compiled in into your exim binary.

If so, search for "pgsql" in the spec.txt documentation to find a few
examples, look for the option pgsql_servers to find out how to specify
the database and the host/password variables.


Here are some queries that should give you an impression of how it works:

domainlist popdomains = pgsql; select domain from tbldomains where \
       relayonly = 0 and domain = '${quote_pgsql:$domain}' and enabled = 1;



domainlist relay_to_domains = pgsql;select domain from tbldomains \
  where lower(domain) = lower('${quote_pgsql:$domain}') \
          and relayonly = 1 and enabled = 1;



domainforward:
[...]
data = ${lookup pgsql{select forward from tblforward where lower(alias) = \
    lower('${quote_pgsql:$local_part@$domain}') \
            and forwardisfile = 0 and enabled = 1}{$value}}



HTH,
Joachim

--
*****PGP key available - send e-mail request***** - ICQ: 37225940
Evolution is a million line computer program falling into place by
accident.