[exim] Make dsearch failure due to non-existing path non-fat…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Paul Menzel
Dátum:  
Címzett: exim-users
Régi témák: [exim] localhost instead of real domain used
Tárgy: [exim] Make dsearch failure due to non-existing path non-fatal (was: localhost instead of real domain used)
Dear Exim folks,


Am 05.04.21 um 11:38 schrieb Paul Menzel:

> I upgraded from Exim 4.92 to 4.94, and now my formerly working
> configuration with the mailing list manager Sympa fails.
>
> I already updated to using non-tainted data
>
> ```
> diff --git a/exim4/conf.d/router/110_local-config_sympa
> b/exim4/conf.d/router/110_local-config_sympa
> index 44bd8fa..b53fb73 100644
> --- a/exim4/conf.d/router/110_local-config_sympa
> +++ b/exim4/conf.d/router/110_local-config_sympa
> @@ -10,8 +10,9 @@ sympa_aliases:
> sympa_router:
>   driver = accept
>   domains = +sympa_domains
> +  local_parts = dsearch,ret=full;/var/lib/sympa/expl/$domain_data
>   require_files = +SYMPA_HOME/expl/$domain/$local_part/config
> -  condition = ${if eqi{${lookup{status}lsearch{SYMPA_HOME/expl/$domain/$local_part/config}}}{open}{yes}{no}}
>
> +  condition = ${if eqi{${lookup{status}lsearch{SYMPA_HOME/expl/$domain_data/$local_part_data/config}}}{open}{yes}{no}}
>
>   user = sympa
>   local_part_suffix_optional
>   local_part_suffix = -request : -editor : \
> @@ -21,8 +22,9 @@ sympa_router:
> sympaowner_router:
>   driver = accept
>   domains = +sympa_domains
> +  local_parts = dsearch,ret=full;/var/lib/sympa/expl/$domain_data
>   require_files = +SYMPA_HOME/expl/$domain/$local_part/config
> -  condition = ${if eqi{${lookup{status}lsearch{SYMPA_HOME/expl/$domain/$local_part/config}}}{open}{yes}{no}}
> +  condition = ${if eqi{${lookup{status}lsearch{SYMPA_HOME/expl/$domain_data/$local_part_data/config}}}{open}{yes}{no}}
>
>   user = sympa
>   local_part_suffix_optional
>   local_part_suffix = -owner : -owner+*
> ```
>
> But now I am stuck with:
>
> ```
> 2021-04-04 21:01:52.507 [22134] 1lT9sW-0005l0-1q <= mylist-owner@???
> U=sympa P=local S=1584 M8S=0 RT=0.193s
> id=d9c25490-6e5d-472f-3bea-6dd073d63135@??? from
> <mylist-owner@???> for user@??? user2@???
> 2021-04-04 21:01:52.530 [22135] 1lT9sW-0005l0-1q failed to open
> /var/lib/sympa/expl/localhost for directory search: No such file or
> directory
> ```
>
> `mylist` is a directory in `/var/lib/sympa/expl/`.


[…]

> Some more debug output (with unobfuscated data) in [1].

The panic above is actually for `user@???`, which is a virtual
domain setup, so `user@???` is delivered to `user@localhost`.

As `localhost` is not a directory in `/var/lib/sympa/expl/`, before the
change in `sympa_router` above, the router was actually skipped,
because the line below failed, and the router was skipped.

     condition = ${if 
eqi{${lookup{status}lsearch{SYMPA_HOME/expl/$domain/$local_part/config}}}{open}{yes}{no}}


With the change for Exim 4.94 to use untainted data

     local_parts = dsearch,ret=full;/var/lib/sympa/expl/$domain_data


this line now fails, because `/var/lib/sympa/expl/localhost` does not exist.

Is there a way, to make a failure in this line (non-existing directory)
non-fatal and just skip the router?


Kind regards,

Paul