[exim] Preserving $local_part_suffix Dynamically in Address…

Pàgina inicial
Delete this message
Reply to this message
Autor: richs
Data:  
A: exim-users
Assumpte: [exim] Preserving $local_part_suffix Dynamically in Address Lists?
Let's say "user+suffix@???" resolves to an address list (via forward, alias, virtual domain, etc). This list could contain other locally-hosted addresses, as well as remote addresses, such as:

user:johndoe@???,janedoe@???,someone@???

Since we know local addresses can support Plus Addressing, we'd like to preserve the +suffix (while not preserving it for remote domains). So far we have this:

virtual_router:
driver = redirect
local_part_suffix = +*
local_part_suffix_optional
allow_fail
allow_defer
domains = dsearch;/var/mail/exim/virtualdomains
address_data = ${lookup{$local_part}lsearch*{/var/mail/exim/virtualdomains/$domain}}
data = ${sg{$address_data}{@}{${if match_domain{${extract{2}{@,}{$address_data}}}{+local_domains}{$local_part_suffix@}{@}}}}
no_more

This checks the domain of the first address in the list. If it's local, all addresses have the local_part_suffix inserted.

We'd like to either check each address individually, or do a single search-replace. Does exim have a single substitution item (instead of "sg")?

Any comments appreciated!

Rich