Re: [Exim] $sender_data in 4.34?

Top Page
Delete this message
Reply to this message
Author: Marilyn Davis
Date:  
To: exim-users
Subject: Re: [Exim] $sender_data in 4.34?
On Wed, 23 Jun 2004, Philip Hazel wrote:

>
> $sender_data is only valid for the router in which the lookup occurs. It
> is not preserved from router to router. If you want to save the data, add


Ah ha!!! That was my misunderstanding.

>
> address_data = $sender_data
>
> to the first router. That sets $address_data, which is preserved.


Yes, I thought I got 2 such data slots, but one is plenty and my
configuration file is coming along nicely now.

>
> > One thing I'm sure I don't understand is the difference between the 2
> > syntaxes:
> >
> > mysql;select
> >
> > and
> >
> > ${lookup mysql{select
>
> The second of those changes the value of the option every time it is
> used. This textual manipulation is the same for all expanded options. It
> is not specific to any option. No option does anything special as a
> result of having its text changed (or not changed). You can think of it
> as a kind of pre-rewrite. In your particular case, the text string is
> interpreted as a list AFTER it has been rewritten.
>
> The first of those is a special kind of item that is valid in domain,
> host, and address lists. It uses a lookup as a way of testing whether
> something (a domain, host, address) matches a list, i.e. is in a
> particular set of domains, hosts, or addresses. The simplest lookup is
> lsearch, which just searches a list in a file. But this is inefficient
> for long lists. DBM or cdb files put the list into an indexed form for
> efficiency and similarly a database query can be used to perform the
> test "is this domain/whatever in this list?". The fact that these
> lookups can *also* return data is not the main point here, but
> $sender_data etc are provided as a side-effect, because they can
> sometimes be useful.


I think I see. I guess, because of the new, and useful, side-effect
the difference between the two syntaxes melts into the underlying
implementation?

Well, I learned a lot. I didn't understand that the mysql;select
syntax was possible. I was only using it for lsearch; and dsearch;

A million big THANK YOU's Philip. Your contribution to the small
amount of sense that exists in this world is huge.

Marilyn Davis




>
> --
> Philip Hazel            University of Cambridge Computing Service,
> ph10@???      Cambridge, England. Phone: +44 1223 334714.
> Get the Exim 4 book:    http://www.uit.co.uk/exim-book

>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##
>
>


--