Re: [Exim] Wishlist for "stat" expansion item

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Nico Erfurth
Data:  
Para: Dean Brooks
CC: Philip Hazel, exim-users
Asunto: Re: [Exim] Wishlist for "stat" expansion item
Dean Brooks wrote:

>>>Proposed syntax would be something like:
>>>    ${stat{filename}{lookup-value}}
>>>where the lookup-value would be an enumerator for one of the stat() values.

>>
>>Noted, but I think I would prefer
>>
>>      ${stat:filename}

>>
>>where the result is a sequence of x=y values that you can process with
>>extract.
>
>
> Sounds good to me... I also imagine it results in a lot less coding
> than the other method.
>
> The only caveat would be that the extract will have to deal with the
> possible scenario of the file not existing or not being accessible.
>
> Would that condition cause the ${stat:} expansion to fail or to simply
> return an empty string?
>
> It may be preferrable to have empty string rather than fail, as
> non-existing files may be "normal". The extract item could be
> used to force a fail if the key wasn't found anyway, right?


IMHO it should defer or fail, you can check the existance with
${exists:} or require_files.

ciao