Re: [Exim] SQL and aliases.

Top Page
Delete this message
Reply to this message
Author: Steve Haslam
Date:  
To: Eric Renfro
CC: exim-users
Subject: Re: [Exim] SQL and aliases.
On Mon, Oct 21, 2002 at 10:59:22AM -0500, Eric Renfro wrote:
> Oct 21 10:44:02 ginseng.myrddincd.com exim[11160]: [1\3] 2002-10-21 10:44:02
> H=ginseng.myrddincd.com [192.168.1.10] (psi-jack) sender verify defer for
> <psi-jack@???>: failed to expand "${lookup pgsql {SELECT email FROM
> staticlists WHERE domain = ${quote_pgsql:$domain} AND list =
> ${quote_pgsql:$local_part} } }": lookup of "SELECT email FROM staticlists
> WHERE domain = myrddincd.com AND list = psi-jack " gave DEFER: PGSQL: query
> failed: ERROR: Relation "myrddincd" does not exist


You need to write

WHERE domain = '${quote_pgsql:$domain}'

${quote_pgsql:...} doesn't add the single-quotes.

> Now, I guess, How could I get it to only check domains listed by a
> staticlists quqery, and only lookup queries for the desintation being
> $local_part, so it doesn't try to double-send emails, and failing the second
> time around?


sth like:

domains = pgsql;SELECT DISTINCT domain FROM staticlists

?

SRH
--
Steve Haslam      Reading, UK                           araqnid@???
Debian GNU/Linux Maintainer                               araqnid@???
almost called it today, turned to face the void, numb with the suffering
and the question- "Why am I?"                                  [queensrÿche]