Bug#653750: section 10.7 and caching a typed list which includes a file name
Andreas Metzler
ametzler at downhill.at.eu.org
Thu Jul 19 17:32:26 UTC 2012
On 2012-07-18 Regid Ichira <regid23 at yahoo.com> wrote:
> --- On Sat, 7/14/12, Andreas Metzler <ametzler at downhill.at.eu.org> wrote:
[...]
>> I am pretty sure this change is not correct, the contents of
>> files are
>> cached.
>
>> For illustration, compare the results of these two settings
>> (with
>> /etc/exim4/dc_other_hostnames containing a single line,
>> listing a
>> single domain):
>> [1] domainlist local_domains =
>> ${readfile{/etc/exim4/dc_other_hostnames}}
>> [2] domainlist local_domains =
>> /etc/exim4/dc_other_hostnames
>>
>> "exim -d+expand" shows this for [2]
>> check domains = !+local_domains
>> cached no match for +local_domains
>> cached lookup data = NULL
> I have tried to reproduce that, and couldn't.
[...]
I ran a simulated delivery attempt (swaks --pipe "exim -d+expand -bh
127.0.0.2" -f ametzler at downhill.at.eu.org -t
ametzler at downhill.at.eu.org), and watched how the respective list was
matched multiple times (by the acls).
> I do have some comments on the output you gave. I am not sure
> they are worth something, but here it is. Just in case:
> 1. What is the related output for [1]?
expanding: /etc/exim4/dc_other_hostnames
result: /etc/exim4/dc_other_hostnames
expanding: ${readfile{/etc/exim4/dc_other_hostnames}}
result: downhill.g.la
downhill.at.eu.org in "downhill.g.la"? no (end of list)
And the expansions happens again and again.
> 2. Doesn't the output you gave actually shows that the cache doesn't
> work for file names? I mean, it does say it wasn't in the cache,
> doesn't it?
Afaiui the message says that it already checked the hostname against
the list, and it does not match.
The respective "caching" debug messages with an
external file look identical with
a) domainlist local_domains = example.com
b) domainlist local_domains = /file/containing/just/example.com
c) domainlist_cache local_domains = ${readfile{/file/containing/just/example.com}}
> 3. Perhaps the data is expected not to be cached for the first
> evaluation of the list. Which means that a correct test must
> make sure that the delivery process will evaluate the list more
> then once? Did your test made sure the list is evaluated more
> then once?
[...]
Yes they did, the first check has no caching message.
cu andreas
More information about the Pkg-exim4-maintainers
mailing list