Re: [Exim] Postgres +rbl

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Nico Erfurth
Datum:  
To: Johnson, Michael
CC: exim-users@exim.org
Betreff: Re: [Exim] Postgres +rbl
On Tue, 31 Dec 2002, Johnson, Michael wrote:

> Thanks in advance for any help.
>
> #this is what i use for my local domaisn
>
> domainlist local_domains = @ : \
>     @[] : \
>         ${lookup pgsql {SELECT domain_name FROM virtual_domains where
> domain_name ='${quote_pgsql:$domain}'}}


Thats fine, but only because it returns a SINGLE row.

>
> # this is my dnslists
> dnslists = ${lookup pgsql {SELECT rbl_list FROM rbl_lists }}
>
> Running this select does return 7 rows.


The problem is, that the lookup return

rbl1.domain.tld
rbl2.domain.tld
rbl3.domain.tld
...

But, exim wants this:
rbl1.domain.tld : rbl2.domain.tld : rbl3.domain.tld

the best thing to do is to use ${sg} or ${tr} to replace \n with :
like

dnslists = ${lookup pgsql {SELECT rbl_list FROM rbl_lists}\
{$sg {$value} {\\n} {:}}}


ciao