Mailing List Archive

[Bug 459] Generic variable containing the item looked for in a (query-style) lookup
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

http://www.exim.org/bugzilla/show_bug.cgi?id=459





------- Comment #1 from ph10@hermes.cam.ac.uk 2007-02-01 09:34 -------
On Wed, 31 Jan 2007, holmgren@lysator.liu.se wrote:

> I think there should be a variable that is set to the relevant lookup key
> before a router or ACL condition is checked. It can be used for the purpose of
> bug 211 too.

What should this key contain for a hosts condition?

Philip

--
Configure bugmail: http://www.exim.org/bugzilla/userprefs.cgi?tab=email

--
## List details at http://www.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 459] Generic variable containing the item looked for in a (query-style) lookup [ In reply to ]
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

http://www.exim.org/bugzilla/show_bug.cgi?id=459





------- Comment #2 from holmgren@lysator.liu.se 2007-02-01 10:06 -------
On Thursday 01 February 2007 10:34, ph10@hermes.cam.ac.uk wrote:
> What should this key contain for a hosts condition?

:-P

Why, the hostname of course. You'd have to use e.g. net-mysql to make the IP
address be the key, in a manner similar to single-key lookups.

Or there could be two variables; one for IP addresses and one for everything
else. That would still make lookups recyclable.

But the big problem is that the query string is in many cases expanded before
it's passed to match_isinlist() or match_address_list(). That would have to
change.

--
Configure bugmail: http://www.exim.org/bugzilla/userprefs.cgi?tab=email

--
## List details at http://www.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 459] Generic variable containing the item looked for in a (query-style) lookup [ In reply to ]
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

http://www.exim.org/bugzilla/show_bug.cgi?id=459





------- Comment #3 from ph10@hermes.cam.ac.uk 2007-02-01 10:14 -------
On Thu, 1 Feb 2007, holmgren@lysator.liu.se wrote:

> ------- Comment #2 from holmgren@lysator.liu.se 2007-02-01 10:06 -------
> On Thursday 01 February 2007 10:34, ph10@hermes.cam.ac.uk wrote:
> > What should this key contain for a hosts condition?
>
> :-P
>
> Why, the hostname of course.

So, if somebody says

hosts = 192.168.1.1

which works quite happily now, you want Exim to try to look up a
hostname before processing that list? Is that right? That is highly
incompatible because it is resource-wasteful and there is the defer
problem.

> You'd have to use e.g. net-mysql to make the IP
> address be the key, in a manner similar to single-key lookups.

The string expansion happens *before* the list is scanned, and therefore
*before* Exim knows what kind of items there are in the list.

> But the big problem is that the query string is in many cases expanded before
> it's passed to match_isinlist() or match_address_list(). That would have to
> change.

Massively incompatible change.

I know this is an awkward area, but it has "grown up" that way, and to
disturb it now would, I believe, cause hassle because it would almost
certainly affect existing installations. Therefore, I think any change
of this magnitude must be an "Exim 5" issue.

Philip

--
Configure bugmail: http://www.exim.org/bugzilla/userprefs.cgi?tab=email

--
## List details at http://www.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 459] Generic variable containing the item looked for in a (query-style) lookup [ In reply to ]
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

http://www.exim.org/bugzilla/show_bug.cgi?id=459


holmgren@lysator.liu.se changed:

What |Removed |Added
----------------------------------------------------------------------------
Keywords|work:small |work:large




------- Comment #4 from holmgren@lysator.liu.se 2007-02-01 10:45 -------
AFAICT, the domains and local_parts router precondition settings, for example,
are given to match_isinlist unexpanded, but the match_domain and
match_local_part expansion conditions expand their arguments beforehand.
Changing eval_condition() so that it parses the second argument without
expanding it is not incompatible in and of itself, but there is still a massive
catch 22 which may require incompatible changes (for example that the list is
split before expansion or that it is expanded twice - yuck).

--
Configure bugmail: http://www.exim.org/bugzilla/userprefs.cgi?tab=email

--
## List details at http://www.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 459] Generic variable containing the item looked for in a (query-style) lookup [ In reply to ]
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

http://www.exim.org/bugzilla/show_bug.cgi?id=459





------- Comment #5 from ph10@hermes.cam.ac.uk 2007-02-01 11:12 -------
On Thu, 1 Feb 2007, holmgren@lysator.liu.se wrote:

> Changing eval_condition() so that it parses the second argument without
> expanding it is not incompatible in and of itself, but there is still a massive
> catch 22 which may require incompatible changes (for example that the list is
> split before expansion or that it is expanded twice - yuck).

Indeed, and consider the case where people use a lookup to obtain a
list:

local_parts = <some lookup that involved $domain>

This does not seem unreasonable: the local parts that are acceptable are
dependent on the domain.

I really, really, don't fancy tampering with this area. :-)

Philip

--
Configure bugmail: http://www.exim.org/bugzilla/userprefs.cgi?tab=email

--
## List details at http://www.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 459] Generic variable containing the item looked for in a (query-style) lookup [ In reply to ]
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

http://www.exim.org/bugzilla/show_bug.cgi?id=459





------- Comment #6 from holmgren@lysator.liu.se 2007-02-07 20:06 -------
On Thursday 01 February 2007 12:12, ph10@hermes.cam.ac.uk wrote:
> Indeed, and consider the case where people use a lookup to obtain a
> list:
>
> local_parts = <some lookup that involved $domain>
>
> This does not seem unreasonable: the local parts that are acceptable are
> dependent on the domain.

Then so be it. It is also common to use $domain in the filename for an lsearch
lookup. That makes such lookups likewise dependent. I'm only looking at
making single-key and query-style lookups more similar.

--
Configure bugmail: http://www.exim.org/bugzilla/userprefs.cgi?tab=email

--
## List details at http://www.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 459] Generic variable containing the item looked for in a (query-style) lookup [ In reply to ]
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

http://www.exim.org/bugzilla/show_bug.cgi?id=459


holmgren@lysator.liu.se changed:

What |Removed |Added
----------------------------------------------------------------------------
Severity|bug |wishlist



--
Configure bugmail: http://www.exim.org/bugzilla/userprefs.cgi?tab=email

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