Re: [Exim] wildlsearch and aliases

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Philip Hazel
Datum:  
To: Arkadiusz Miskiewicz
CC: exim-users
Betreff: Re: [Exim] wildlsearch and aliases
On Wed, 3 Sep 2003, Arkadiusz Miskiewicz wrote:

> I want to have file with wildcards in aliases like:
>
> cvs-*:    root
> system-*:    admin


I'm afraid you can't do that (at least, not directly).

> data = ${lookup{$local_part}wildlsearch{/etc/mail/aliases}}


> But that doesn't work like expected:


The reason is that the "*" feature in Exim is very restricted. It *only*
works as a leading character - a shorthand for "ends with". If you want
fancier patterns, you must use a regular expression. For "begins with",
which is what you have here, you could use

^cvs-      root


Note that

^cvs-.*    root


is the same, but wastes some resources unnecessarily.

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