Re: [Exim] non-default alias file

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Philip Hazel
Dátum:  
Címzett: Frank Heydlauf
CC: exim-users
Tárgy: Re: [Exim] non-default alias file
On Tue, 18 Dec 2001, Frank Heydlauf wrote:

> For historical reasons I have an alias-file which contains not only the
> well known "<local-part>: <list of forwarder/pipe/mbox>" but although
> some additional parts.
>
> The format is:
>
> <local-part> <a> <b> <c> <d> <list of forwarder/pipe/mbox>
>
> a,b,c,d are password, quota and some other flags, used for
> qpopper, web-interface, ... (no real-accounts!)
>
> My question now:
> Can I use this file in exim to route my mails?


Yes. I assume you are using Exim 3. Try a director like this:

my_aliases:
  driver = smartuser
  new_address = ${lookup{$local_part}lsearch{/the/alias/file}\
                {\
                ${if match{$value}{^(\\S+\\s+)\{4\}(.*)}{$2}}\
                }\
                fail}


The regular expressions assumes the separators are spaces. I have not
tested this.


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