Autor: John Burnham Datum: To: Balvant Mistry CC: exim-users Betreff: Re: [exim] Dynamic alias in Exim
> Thanks for the feedback John, >
>
> We currently have a router like this ..
>
> # Staff aliases / forwards
> twoergo_aliases:
> driver = redirect
> domains = +2ergo_domains
> check_ancestor
> allow_fail
> allow_defer
> data = ${lookup{$local_part}lsearch{/etc/exim4/2ergo.aliases}}
> user = mail
> file_transport = address_file
> pipe_transport = address_pipe
>
>
> How do we ammend / add to this to achieve what we want ?
> By the way, it's worth responding to the list (just in case the individual you're
responding to isn't around - someone else on the list might still be able to help).
OK, as you probably know routers are run in order, so I'd stick a new router before your
twoergo_aliases one - something like
mobile_script:
driver = redirect
domains = +2ergo_domains
condition = ${if match {$local_part}{regular expression you want to match}}
data = "|/some/script/or/other"
user = mail
pipe_transport = address_pipe
(Note: entirely untested and whipped up in a hurry as I'm about to go into a meeting.)
But anyway, that router will be tried before your aliases but will only get triggered if
the condition is met. If the condition isn't met, the mail goes on to the next router
which would be your aliases one and things carry on as normal.
John