Re: [Exim] regexp lookups from a file

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Philip Hazel
日付:  
To: Tony Finch
CC: exim-users, subs
題目: Re: [Exim] regexp lookups from a file
On Mon, 4 Nov 2002, Tony Finch wrote:

> My hack would fit the single-key lookup mould without difficulty. The
> file contains stuff like the following:
>
>    # in case an apache list is missed by the forward_table
>    s/^(apache-)?(.*)-return-\d+-.*@apache\.org$/apache-$2/i

>
> i.e. lines may be empty or comments or Perlish s/// operators.


I thought some more about this over night. I don't like that idea simply
because it is completely alien to the normal Exim syntax. I think a
better syntax would be what we already have in the rewriting section of
the config file. (Where "better" = "better at this stage, because it's
like something that already exists", not "better in the absolute".) So
you would have lines like

^(?i)(apache-)?(.*)-return-\d+-.*@apache\.org$ apache-$2

Thinking about the description of it, I decided that the only way to go
was to define a third kind of lookup, to distinguish it from the
single-key and query-styles. It would be called something like
"wildlsearch", because the natural way to implement it would allow for
all the kinds of wildcarding that Exim supports, not just regular
expressions. With any luck, much of the code for rewriting could be
re-used.

I'll stuff it on the Wish List.

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