Re: [exim] Problem with lookup an alias for a domain

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Heiko Schlittermann
Datum:  
To: exim-users
Betreff: Re: [exim] Problem with lookup an alias for a domain
Fabio Martins via Exim-users <exim-users@???> (Sa 13 Feb 2021 15:13:59 CET):
>
> I have a working exim 4.89 setup on Linux with alias lookup. The same
> setup is not working with 4.94 on OpenBSD.
>
> Did something changed between versions, that I am not aware of?
>
> system_aliases:
> driver = redirect
> allow_fail
> allow_defer
> data = ${lookup{$local_part}lsearch*@{/etc/exim4/aliases.d/$domain}}


You can't use the $domain directly to construct a file system path.
See the "tainted" wording:

> 31068 LOG: MAIN PANIC
> 31068 Tainted filename for search: '/etc/exim/aliases.d/DOMAIN001.COM'
> 31068 system_aliases router: defer for support@???
> 31068 message: failed to expand


The $domain is data we do not have under control.
You need another lookup first, to check if the $domain matches your
expectations, and then use "$domain_data", which will be untainted.

    system_aliases:
        …
        domains = +local_domains
        data = ${lookup{$local_part}lsearch*@{/etc/exim4/aliases.d/$domain_data}}


    Best regards from Dresden/Germany
    Viele Grüße aus Dresden
    Heiko Schlittermann
--
 SCHLITTERMANN.de ---------------------------- internet & unix support -
 Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
 gnupg encrypted messages are welcome --------------- key ID: F69376CE -