Re: [Exim] Postgresql and Virtual Email

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Brian C. Doyle
Date:  
À: exim
Sujet: Re: [Exim] Postgresql and Virtual Email
Okay, So I found that I had not even built EXIM with PGSQL Support
I edit the Local/Makefile as:

LOOKUP_PGSQL=yes

# Additional libraries and include directories may be required for some
# lookup styles, e.g. LDAP, MYSQL or PGSQL. LOOKUP_LIBS is included only on
# the command for linking Exim itself, not on any auxiliary programs. You
# don't need to set LOOKUP_INCLUDE if the relevant directories are already
# specified in INCLUDE.
# LOOKUP_INCLUDE=-I /usr/local/ldap/include -I /usr/local/mysql/include -I
/usr/local/pgsql/include
# LOOKUP_LIBS=-L/usr/local/lib -lldap -llber -lmysqlclient -lpq
LOOKUP_INCLUDE=-I /usr/local/pgsql/include
#LOOKUP_LIBS=-L/usr/local/lib -lpq
LOOKUP_LIBS=-L/usr/local/pgsql/lib

When I run make i get

lookups/lookups.a(pgsql.o): In function `pgsql_tidy':
pgsql.o(.text+0x42): undefined reference to `PQfinish'
lookups/lookups.a(pgsql.o): In function `perform_pgsql_search':
pgsql.o(.text+0x1a4): undefined reference to `PQsetdbLogin'
pgsql.o(.text+0x1af): undefined reference to `PQstatus'
pgsql.o(.text+0x1c0): undefined reference to `PQerrorMessage'
pgsql.o(.text+0x1db): undefined reference to `PQfinish'
pgsql.o(.text+0x246): undefined reference to `PQexec'
pgsql.o(.text+0x251): undefined reference to `PQresultStatus'
pgsql.o(.text+0x264): undefined reference to `PQresultErrorMessage'
pgsql.o(.text+0x293): undefined reference to `PQnfields'
pgsql.o(.text+0x2a1): undefined reference to `PQntuples'
pgsql.o(.text+0x2f4): undefined reference to `PQgetlength'
pgsql.o(.text+0x308): undefined reference to `PQgetvalue'
pgsql.o(.text+0x356): undefined reference to `PQfname'
pgsql.o(.text+0x3a6): undefined reference to `PQgetvalue'
pgsql.o(.text+0x4fb): undefined reference to `PQclear'
collect2: ld returned 1 exit status
make[1]: *** [exim] Error 1
make: *** [go] Error 2


What is it that I am missing????



1:53 PM 3/27/2002 +0100, Joachim Wieland wrote:
>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.
>
>--
>
>## List details at http://www.exim.org/mailman/listinfo/exim-users Exim
>details at http://www.exim.org/ ##