Re: untainting alias file lookup
Paul Muster via Exim-users <[email protected]> Tue, 28 Oct 2025 15:50:18 +0100
| Newsgroups | gmane.mail.exim.user |
|---|---|
| Message-ID | <[email protected]> |
Am 27.10.2025 um 12:18 schrieb Klaus Ethgen via Exim-users:
> Am Mo den 27. Okt 2025 um 12:03 schrieb Paul Muster via Exim-users:
>> virtual:
>> driver = redirect
>> allow_defer
>> allow_fail
>> data = ${lookup{$local_part}lsearch*{CONFDIR/aliases/$domain}}
>> domains = lsearch;CONFDIR/localdomains
>> no_more
>> qualify_preserve_domain
>> retry_use_local_part
> [...]
>> data = ${lookup{$local_part_data}lsearch*${lookup{$domain}
>> dsearch,ret=full,filter=file {CONFDIR/aliases/}}}
>
> Much too complicated.
>
> I have something similar too. Use the following:
> - domains = dsearch;/etc/exim4/aliases
> - data = ${lookup...lsearch{/etc/exim4/aliases/$domain_data}}
>
> That should work.
Indeed.
virtual:
driver = redirect
allow_defer
allow_fail
# domains = lsearch;CONFDIR/localdomains
# data = ${lookup{$local_part}lsearch*{CONFDIR/aliases/$domain}}
domains = dsearch;CONFDIR/aliases/
data = ${lookup{$local_part}nwildlsearch{CONFDIR/aliases/$domain_data}}
no_more
qualify_preserve_domain
retry_use_local_part
I just needed to cleanup in CONFDIR/aliases/ so that the dsearch in
"domains =" does not find too many domains. The main domain (!virtual
domains) had a file there which needed to be moved away (contents merged
into /etc/aliases handled by system_aliases router).
Many thanks.
Regards,
Paul
--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## [email protected]
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/