Re: untainting alias file lookup

Klaus Ethgen via Exim-users <[email protected]> Mon, 27 Oct 2025 12:18:10 +0100
Newsgroups gmane.mail.exim.user
Message-ID <[email protected]>
Hi Paul,

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.

Mine is for example:
```
domain_aliases:
  debug_print = "R: domain_aliases for $local_part@$domain"
  driver = redirect
  domains = dsearch;/etc/exim4/domains
  local_part_suffix = +*
  local_part_suffix_optional
  allow_fail
  allow_defer
  data = ${lookup{$local_part}nwildlsearch{/etc/exim4/domains/$domain_data/aliases}}
```

Regards
   Klaus
-- 
Klaus Ethgen                                       http://www.ethgen.ch/
pub  4096R/4E20AF1C 2011-05-16            Klaus Ethgen <[email protected]>
Fingerprint: 85D4 CA42 952C 949B 1753  62B3 79D0 B06F 4E20 AF1C


-- 
## 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/
signature.asc (application/pgp-signature, 688 B)
-----BEGIN PGP SIGNATURE-----
Comment: Charset: ISO-8859-1

iQGzBAABCgAdFiEEMWF28vh4/UMJJLQEpnwKsYAZ9qwFAmj/VPEACgkQpnwKsYAZ
9qyeuQwAnSq6hfnpLgpvh/1PRfd5biAHDf6nivP/XoHlAh61F3ygD1OZwp4VhtPl
Nn7nXCTkzNcR4hokbtV0uChnbJQMhy5GCJ28f5Y2L+RR6XXWXGmhg6wDHMkphfwk
+j76BxV7IHPVD2k6J3ycDVv6DXt+msJal1xoMHqdHCvSBgfo9OsWQU3u3Uq73cun
+G7QEoF3jx7929ZuBCWHFmwzaP65TCwmL24nr6nNWN3jYieCjD11HbwQCOnJk8y+
jK+bWv6RKo2f0faicYouiYUwLiruY47xAfd2G6gNQqQfgLlwmOQM6v0SSAG+2JAW
cyEBPUCaxnfDFTyEsTXh8HmY9Q/jDXO8Gf5zZDtXJgxUejBXs9vcue6rkZghR2GL
1Lq18qzr5Q1A0C5TgF90YZ72nQPE2gS1VNAzaeDJt5DEA5QYsejzJb47iTEn5ulT
lWjxiJ0gOGQQwV2tJeYz+/YaFGJCNx8hmxRPPXxmKvORyQpl0lXACg6rNHxopak0
CKg7fjaX
=QSGg
-----END PGP SIGNATURE-----