Bug#653750: section 10.7 and caching a typed list which includes a file name

Regid Ichira regid23 at yahoo.com
Wed Jul 18 05:53:04 UTC 2012


--- On Sat, 7/14/12, Andreas Metzler <ametzler at downhill.at.eu.org> wrote:

> On 2012-01-08 Regid Ichira <regid23 at yahoo.com>
> wrote:
> >   Based on
> 
> >     $ zgrep -A22 '^10.3 File names
> in lists' \
> >     >
> /usr/share/doc/exim4-base/spec.txt.gz | tail -4
> >     Putting a file name in a list
> has the same effect as inserting
> >     each line of the file as an
> item in the list (blank lines and
> >     comments excepted). However,
> there is one important difference:
> >     the file is read each time the
> list is processed, so if its
> >     contents vary over time, Exim's
> behaviour changes.
> 
> > I think the following patch should be applied to
> section '10.7 Named
> > list caching':
> 
> > --- spec.txt    2012-01-09 00:09:38.000000000
> +0200
> > +++ spec.txt.mod        2012-01-09
> 00:11:49.000000000 +0200
> [...]
> > -the cache operates only if the list contains no $
> characters, which guarantees
> [...]
> > +the cache operates only if the list contains no $
> characters, and no file
> > +names, which guarantees that it will not change when
> it is expanded.
> [...]
> 
> 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 have no experience
with debugging exim.  What I did is to set local_domains as you
suggested and

    # exim -d+expand+lookup -bP +local_domain

.  I couldn't see the output you mentioned.  Did I miss it?  I guess
it will be better to do that while exim actually delievrs a message.
Can I take upstream's default run time configuration, set
local_domains as required, optionally change the listening port, and
see that output?  What exactly should I do?

  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]?
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?
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?


> I think "if its contents vary over time" refers to the fact
> that a
> newly forked forked exim binary (as happens for every
> incoming
> connection or outgoing delivery) will read the new file.
> 


  All I have is what I qouted from spec.txt.



More information about the Pkg-exim4-maintainers mailing list