Re: [exim] PCRE virtual addresses

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Jeremy Harris
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] PCRE virtual addresses
On 25/02/15 05:57, Jim Trigg wrote:
> The idea is that for example jtrigg+anything@??? (for domains
> where jtrigg is a valid recipient) redirects to
> blaise+$domain-$local_part_suffix@localhost. The service accounts
> redirect to blaise+$domain-$local_part@localhost.
>
> I know the redirects I suggest in Exim format don't quite match what I
> currently have, but they're close enough for me - I don't mind adding
> the tld to the domain or "master" to the role for the ones I'm currently
> shortening; either way would work for me.
>
> Munged example to elide actual domain names from my existing virtual.pcre:
> /^(abuse|policyd|root)@(anydomain).tld$/    blaise+${2}-${1}@localhost
> /^(host|list|post|web)master@(anydomain).tld$/    blaise+${2}-${1}@localhost
> /^jtrigg([-+].+)@(anydomain).tld$/        blaise+${2}${1}@localhost
> /^jtrigg@(anydomain).tld$/            blaise+${1}@localhost


(not tried)

begin routers:

...

services:
  driver =      redirect
  local_parts = abuse : policyd : root \
                : hostmaster : listmaster : postmaster : webmaster
  data =        blaise+${sg{$domain}{\N^(.*)\.[^.]+$\N}{\$1}}@localhost


suffix_p:
  driver =                     redirect
  local_part_prefix =          jtrigg
  local_part_suffix =          +*
  local_part_suffix_optional = true
  data =                       blaise$domain$local_part_suffix@localhost


suffix_n:
  driver =                     redirect
  local_part_prefix =          jtrigg
  local_part_suffix =          -*
  data =                       blaise$domain$local_part_suffix@localhost




--
Cheers,
Jeremy