Re: [exim] virtual mail redirect question

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Vincent Stemen
Date:  
À: exim-users
Sujet: Re: [exim] virtual mail redirect question
On Sun, Mar 12, 2006 at 06:11:28PM +0100, Phil Pennock wrote:
> On 2006-03-11 at 22:45 -0600, Vincent wrote:
> > I have successfully configured it to have separate alias files for each
> > domain for virtual domains.  I am using 
> >     data = ${lookup{$local_part} nwildlsearch{/etc/exim/virtual/$domain}}

>
> > Is there a way to configure exim so I can have something like
> >     *   vince-$local_part
> > in the alias file for the virtual domain, so that it will work like
> > a catch all, but forward to a unique local_part_suffix for each user?

> >
> > It does not seem to expand variables, such as $local_part, in the alias
> > file.
>
> file:
>  *     vince-LOCALPART

>
> Router, don't use the default {$value} result (untested):
>  data = ${lookup{$local_part} nwildlsearch{/etc/exim/virtual/$domain} \
>      {${sg{$value}{LOCALPART}{$local_part}}}fail}

>
> Exim Spec, section 10.5 has details on "Expansion items" which includes
> ${lookup ...} and ${sg...}.
>
> Your existing "data" rule is using an abbreviated form of ${lookup},
> which has an implicit {$value}fail at the end. Read the section on
> lookup in 10.5 for clear details.
>
> Regards,
> -Phil


Thank you very much Phil. That works perfectly.

BTW, actually it is section 11.5 (at least with the docs that came with
my installation of exim 4.50). Section 10.5 discusses named lists.

Regards,
Vincent

--
Vincent Stemen
Avoid the VeriSign/Network Solutions domain registration trap!
Read how Network Solutions (NSI) was involved in stealing our domain name.
http://inetaddresses.net/about_NSI.html