Re: [Exim] Matching an address (v4)

Etusivu
Poista viesti
Vastaa
Lähettäjä: Philip Hazel
Päiväys:  
Vastaanottaja: Alan J. Flavell
Kopio: Exim users list
Aihe: Re: [Exim] Matching an address (v4)
On Wed, 28 Aug 2002, Alan J. Flavell wrote:

> But now I'm puzzled that the v4 documentation, in 9.4, shows this
> syntax: dbm*@
>
> with the *@ to the right; and 9.5 refers to:
>
>          If the search type ends in ``*'' or ``*@''
>                             ^^^^

>
> Whereas you are writing the *@ on the left of the lookup/search type,
> which still has me confused.


The problem is that there aren't enough characters in the character set.
This causes them to be overloaded and used in different ways. In an
address list entry such as *@dbm;/some/file the *@ is not part of
the lookup type. Perhaps if I show the analgous root@dbm;/some/file
the penny might drop.

In *@dbm;/some/file the * is a pattern that matches any local part; the
@ is the @ of an email address, and dbm;/some/file is a lookup that
matches the domain. This is a specific form of item that may appear in
an address list. It is not a general lookup item. It is specifying
independent lookups of the local part and the domain.

In an alias file setting such as

data = ${lookup{$local_part@domain}dbm*@{/some/file}}

the *@ _is_ an extension to the lookup type, affecting how the lookup
works.

9.4 does suggest that you are permitted to write

    dbm*@;/some/file


in an address list, and indeed you are (10.12 says you can't use
partial-, however). But that does not have the same effect. Suppose the
sender address you are checking is a@???. The effect of that lookup is
to look up the strings "a@???", "*@b.c", and "*", in that order. And
that's all. That is as described in 9.4. There's no subsequent looking
up of just the domain. I will make this clearer in the documentation.

Philip

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.