[exim] Re: query-style lookup for text files

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Jakob Hirsch
Data:  
Para: 'Exim-users'
Asunto: [exim] Re: query-style lookup for text files
Marc Haber wrote:

> |${lookup textfile {/etc/exim4/passwd.client; match{${lookup dnsdb{a=$1}{$value}fail}}{$host_address}}{$2}fail}}


As I remember, the reason why this came up a while ago was this:

client authentication information is in /some/file, with the host used
as the key. There is a smarthost router for this host and the
corresponding smtp transport has "hosts_require_auth = /some/file". But
if you use $host as lookup key in the authenticator, it is not
necessarily the same name as in /some/file, because Exim seems to
resolve CNAMEs and put the result into $host.
One example is auth.mail.onlinehome.de, which is a CNAME to
authmailonline.kundenserver.de.

So what you want is a lookup that runs an expansion for every single
line? This could be useful for other things, too, so it might be cool
anyway. But I think it would be a lot easier to stop Exim from resolving
or better store the original in $original_host.
Or you use $address_data (as somebody wrote). The doc suggests to use it
like "key1=data1 key2=data2...", so it's save and extract multiple
information.