Re: [Exim] is it possible to use a single lsearch file for d…

Pàgina inicial
Delete this message
Reply to this message
Autor: Nico Erfurth
Data:  
A: Jonathan Vanasco
CC: Exim-users
Assumpte: Re: [Exim] is it possible to use a single lsearch file for delivery/redirect / block ?
Jonathan Vanasco wrote:
> I'm going crazy on this. Forgive the reposting.
>
> I'd like to have a file like this:
>     /usr/exim/virtualdomain
>     -------------------------------
>     *: user_a@virtualdomain
>     user_a: /var/spool/virtual_mail/u/user_a
>     user_b: user_a@virtualdomain
>     sales: X

>
> and an exim router that would do something like this:
>     myRouter:
>         address_data =
> ${lookup{$local_part}lsearch*{/usr/exim/virtual_domain}}
>         if address_data is a regex for 'X', fail the delivery
>         if address_data is a regex for a path, deliver it w/ the
> appropriate
> transport and set the driver to accept
>         if address_data is a regex for a valid email address, accept it
> with
> the driver to redirect


megarouter:
driver = redirect
allow_fail
data = ${lookup {$local_part}lsearch*{/etc/exim/virtual_domain}}
file_transport = my_transport


/etc/exim/virtual_domain:

*: user_a@virtualdomain
user_a: /var/spool/virtual_mail/u/user_a
user_b: user_a@virtualdomain
sales: :fail:Account is not available

It's all in the docs.
http://www.exim.org/exim-html-4.30/doc/html/spec_22.html#CHAP22
http://www.exim.org/exim-html-4.30/doc/html/spec_22.html#SECT22.6

Nico