Mailing List Archive

Re: Keep local part suffix in redirect router
Hi,

It l

> routingfri+test@hrz.tu-chemnitz.de
> ------- global_aliases router -------
> local_part=fri+test domain=hrz.tu-chemnitz.de
> stripped suffix +test
> calling global_aliases router
> rda_interpret (string): '${lookup{$local_part@$domain}dbm{/path/aliases}}'
> expanded: 'fri@mailbox.hrz.tu-chemnitz.de'
> file is not a filter file
> parse_forward_list:fri@mailbox.hrz.tu-chemnitz.de
> extract item:fri@mailbox.hrz.tu-chemnitz.de
> global_aliases router generatedfri@mailbox.hrz.tu-chemnitz.de
> errors_to=NULL transport=NULL
> uid=unset gid=unset home=NULL
> routed by global_aliases router
> envelope to:fri+test@hrz.tu-chemnitz.de
> transport: <none>

It looks like the suffix gets stripped off here:
"generatedfri@mailbox.hrz.tu-chemnitz.de"


> ------- local_user router -------
> local_part=fri domain=mailbox.hrz.tu-chemnitz.de
> checking domains
> calling local_user router
> local_user router called forfri@mailbox.hrz.tu-chemnitz.de
> domain = mailbox.hrz.tu-chemnitz.de
> set transport lmtp
> queued for lmtp transport: local_part = fri
> domain = mailbox.hrz.tu-chemnitz.de
> errors_to=NULL
> domain_data=mailbox.hrz.tu-chemnitz.de local_part_data=NULL
> routed by local_user router
> envelope to:fri@mailbox.hrz.tu-chemnitz.de
> transport: lmtp
> fri@mailbox.hrz.tu-chemnitz.de
> <--fri+test@hrz.tu-chemnitz.de
> router = local_user, transport = lmtp

Then that resolved alias, without the suffix ends up getting routed by the
local_router.


...so perhaps you need to find a way to graft it back on to what the
global_aliases router returns.

I think that the wildcard match can be found in $local_part_suffix_v so
perhaps it's a case of doing the work in the "data =
${lookup{$local_part@$domain}dbm{DBM/aliases}}" part of global_aliases?



Alternatively, you could consider a global sieve script in Cyrus, but I
think that's only executed when users do not have their own sieve scripts.





Best wishes,
@ndy

--
andyjpb@ashurst.eu.org
http://www.ashurst.eu.org/
0x7EBA75FF

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/