Re: [Exim] regexp lookups from a file

Pàgina inicial
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
A: Rejo Zenger
CC: exim-users
Assumpte: Re: [Exim] regexp lookups from a file
On Fri, 1 Nov 2002, Rejo Zenger wrote:

> What I would like to have for some domains I host is a file like the
> normal aliases file, but with the added functionality of being able to
> use regular expresions to specify addresses. In other words, I would
> like to have a file with, for example:
>
>   bounce-.*:    rejo


This is not possible in a file. You can, of course, do it in a separate
router:

  xxx:
    driver = redirect
    local_parts = ^bounce-
    data = rejo


I realize that if you have many of these, having so many different
routers is not ideal.

If all you are interested in is prefixes, you can solve the problem
another way:

  xxx:
    driver = redirect
    local_part_prefix = bounce-
    data = ${lookup{$local_part_prefix}lsearch{/some/file}}


where the file contains

bounce-: rejo


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