Autor: Alan J. Flavell Data: Para: Exim users list Assunto: [Exim] callout with three-way switch depending on the results?
I set myself a bit of a puzzle, I tried a number of approaches, and
wasted a colleague's time (hi Chris), but I haven't spotted a way to
achieve this yet. We're talking exim4, if there was any doubt.
Please humour me with this puzzle, if you will. I would like to try a
callout on an address, and then take one of _three_ different actions
depending on whether the callout host actively accepted the address,
actively denied the address, or the request failed, e.g on time-out.
I don't want the transaction deferred if the callout results in a
time-out, in other words.
So, as I see it, the callout needs to have the defer_ok option
specified, in order to avoid the callout resulting in exim doing a
defer. But then a timeout seems to be, at least superficially,
indistinguishable from a success?
So I'm interested to know if there's some way that I can distinguish
between an active response from the callout host, and the callout
having been declared a success because of a timeout in conjunction
with the defer_ok option. I've pored over the expansion variables to
see whether there's anything set which I can test, but I don't find
anything.