Re: [Exim] Postgres +rbl

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Nico Erfurth
Ημερομηνία:  
Προς: Johnson, Michael
Υ/ο: exim-users@exim.org
Αντικείμενο: 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