Re: [exim] IPv6 lookup issues what am I doing wrong?

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Evgeniy Berdnikov
Datum:  
To: exim-users
Betreff: Re: [exim] IPv6 lookup issues what am I doing wrong?
Hello.

On Thu, May 09, 2019 at 08:50:14AM +0000, Spencer Marshall via Exim-users wrote:
> The following works fine for IPv4, by that I mean it sets the smtp_active_hostname correctly for all IPv4 interfaces. However, it does not work for IPv6
> smtp_active_hostname = ${lookup{$received_ip_address}lsearch{/etc/exim/smtp_active_hostname}}


Look here:
https://www.exim.org/exim-html-current/doc/html/spec_html/ch-file_and_database_lookups.html#SECTsinglekeylookups
For lsearch/iplsearch lookup types each file record should be written as:

 "abcd::cdab":      data for abcd::cdab
 "abcd:abcd::/32"   data for abcd:abcd::/32


You can test it as
exim4 -be '${lookup{abcd::abcd}lsearch{/path/to/file}}'
exim4 -be '${lookup{abcd::abcd}iplsearch{/path/to/file}}'
--
Eugene Berdnikov