[Exim] Want soft failure when a file lookup fails

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Sheldon Hearn
Datum:  
To: exim-users
Betreff: [Exim] Want soft failure when a file lookup fails
Hi folks,

I have the following smtp_banner option in my main Exim configuration
section for exim-3.31:

smtp_banner = $primary_hostname ESMTP Exim \
  ${lookup{$sender_host_address} \
    lsearch* {/usr/local/etc/exim/bannerversion} \
    {${expand:$value}}}


The bannerversion file contains this line:

*: [Test release]\r\nYou probably shouldn't be using this service.

If the bannerversion file is absent (perhaps in some small window period
during an update operation), the lookup fails and all incoming SMTP
connections receive a 421 error as documented.

I could use ${exist:/usr/local/etc/exim/bannerversion} to provide a
partial solution to the problem, but this only narrows the window.
Between testing for the existence of the file and trying to read it, it
could still go away.

So, is there a way to ensure that a non-existent file for an lsearch is
treated as if the lookup failed (in this case, null expansion)?

Ciao,
Sheldon.