Re: [exim] Extracting values from a wildlsearch

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Jonas Eckerman
Data:  
Para: exim-users
Assunto: Re: [exim] Extracting values from a wildlsearch
On 2012-03-15 17:49, Todd Lyons wrote:

> He has a file that's used for mapping domain names to a relay server.
> domain.com:    192.168.1.8
> todd.com:    192.168.1.10


> "Now I want to accept relay from IP addresses where I route manually,
> I do not find a way to build a list of<IP> from the file, any hins?


My first thought is that it should be doable with ${readfile...} and
${map...}.

Something similar to:

${map{<; ${readfile{/path/to/file}{;}}}{${sg{$item}{\N^.*:\s*\N}{}}}}

wich (hopefully, I haven't tested it, I've not been careful with the
gullwings and I didn't read all relevant part of the docs just now)
should return a semi-colon separated list of IP addresses from
"/path/to/file".

Regards
/Jonas
--
Jonas Eckerman
Fruktträdet & Förbundet Sveriges Dövblinda
http://www.fsdb.org/
http://www.frukt.org/
http://whatever.frukt.org/