Re: [exim] normalized config format?

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Andrew C Aitchison
Dátum:  
Címzett: Felipe Gasper
CC: Heiko Schlittermann, exim-users
Tárgy: Re: [exim] normalized config format?

>> Felipe Gasper via Exim-users <exim-users@???> (Mo 05 Apr 2021 19:55:39 CEST):
>>>
>>> It seems to leave certain (inconsequential?) whitespace changes in place that make it hard to compare a changeset in an automated way, e.g.:
>>>
>>> -----
>>> -    local_parts = ${if eq{$domain}{$primary_hostname}{+path_safe_localparts}{*}}
>>> +    local_parts = ${if eq {$domain} {$primary_hostname} {+path_safe_localparts} {*} }
>>> -----


If it were just that I would suggest "diff -w" or one of the other
whitespace options, but I see from your next observation that that
would not be sufficient.

On Mon, 5 Apr 2021, Felipe Gasper via Exim-users wrote:
> On another note, I’ve noted via the same parse that this in exim.conf:
>
> -----
> router_home_directory = ${extract{5}{::}{${lookup{${lookup{$domain_data}lsearch{/etc/userdomains}{$value}}}lsearch{/etc/passwd}{$value}}}}
> -----
>
> … gets parsed to this:
>
> -------
> router_home_directory = ${extract{5}{::}{${lookup passwd{${lookup{$domain_data}lsearch{/etc/userdomains}{$value}}}{$value}}}}
> -------
>
> ^^ Note the conversion of the first “lookup” to a “lookup passwd”.
>
> But, if I reflow the exim.conf a bit to:
>
> -----
>    router_home_directory = ${extract \
>        {5} \
>        {::} \
>        {${lookup \
>            {${lookup \
>                {$domain_data} \
>                lsearch \
>                {/etc/userdomains} \
>                {$value} \
>            }} \
>            lsearch {/etc/passwd} \
>            {$value} \
>        } } \
>    }
> -----

>
> … then the conversion to “lookup passwd” doesn’t happen:
>
> -----
> router_home_directory = ${extract {5} {::} {${lookup {${lookup {$domain_data} lsearch {/etc/userdomains} {$value} }} lsearch{/etc/passwd} {$value} } } }
> -----
>
> Is this an optimization of some kind in Exim, which the breaking up into multiple lines is losing?
>
> Thank you!
>
> -F
> --
> ## List details at https://lists.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/
>


-- 
Andrew C. Aitchison                    Kendal, UK
             andrew@???