Re: [exim] PCRE virtual addresses

Top Page
Delete this message
Reply to this message
Author: Jim Trigg
Date:  
To: exim-users
Subject: Re: [exim] PCRE virtual addresses
On Wed, Feb 25, 2015 at 09:36:22AM +0000, Jeremy Harris wrote:
> 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:
>
> ...
>
> suffix_p:
>   driver =                     redirect
>   local_part_prefix =          jtrigg
>   local_part_suffix =          +*
>   local_part_suffix_optional = true
>   data =                       blaise$domain$local_part_suffix@localhost


While the idea of a monolithic configuration file is fine in general,
this is a specific case where a separate file is indicated.
I'd have to do separate routers for each domain in which jtrigg is
a valid recipient. (The server hosts multiple domains; for some my mail
username is jtrigg and for others it's blaise. Similarly, I have other
PCRE expressions for other users who are in more than one domain but not
all domains.)

Thanks,
Jim Trigg