RE: [Exim] Want soft failure when a file lookup fails

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Bernard Stern
Date:  
À: Sheldon Hearn
CC: exim-users
Sujet: RE: [Exim] Want soft failure when a file lookup fails
On Thu, 12 Jul 2001 17:24:13 +0200 Sheldon Hearn wrote:



> On Thu, 12 Jul 2001 16:19:39 +0100, Philip Hazel wrote:


>> 2. Non-existence of a file that you ask Exim to search is treated as a
>> serious error, so it fails the entire expansion. This is usually the
>> best thing to do.


> There you go, that's the answer I'm looking for. If this isn't under
> user control, I'll stop looking for a way to do it. :-)


I'm not sure the following can be used in your situation, but
I had a similar problem with a director config.

My problem was the 'require_files' option: when the expansion did fail,
the driver was run even though this was not the desired thing (the whole
expansion resulted in '', which was not what I expected at first).
So I resolved this in a two-fold search

instead of

require_files = /path/to/som/dir/${lookup {some_string} lsearch {file_to_search} {$value}}/some_other_file

I first checked whether my lookup returned some value, and if not I required the
file to be a non-exitent file, which was what I wanted.

the new condition is:

  require_files = ${lookup {some_string} lsearch {file_to_search} \
                  {/path/to/som/dir/${lookup {some_string} lsearch {file_to_search} {$value}}/some_other_file} \
                  {/some/file/that/cannot/possibly/exist} }


(syntax not guranteed, but you get the idea)

Maybe you can first check that your banner lookup files exists
and then do the lookup, there is certainly a way to do this.
There can't plausibly be any kind of config you can't do with
exim, could it ?? :-))


Bernard Stern, SWITCH