Re: [exim] Sending to a socket that doesn't reply

Top Pagina
Delete this message
Reply to this message
Auteur: Neil Youngman
Datum:  
Aan: Ian Eiloart, exim-users
Onderwerp: Re: [exim] Sending to a socket that doesn't reply
Ian Eiloart wrote:
> --On 21 May 2009 15:09:05 +0100 Neil Youngman <Neil.Youngman@???> wrote:
>
>> I want to use ${readsocket{inet:example.com:1234}{data string}} to send
>> some information to a host that does not send back any data in response.
>> Obviously I don't want to wait for a response, so I guess I need to set a
>> 0 second timeout and handle the fail. Has anyone done this? Any gotchas?
>>
>> I'm thinking, because it will always timeout
>>
>>     condition=!${readsocket{inet:example.com:1234}{data string}}

>>
>> is that sensible? It feels slightly wrong to me, but I can't see any
>> problems with it, other than a lack of obviousness.
>
> There's a default timeout of 5s, if I'm reading the docs right. So you might want to specify something shorter like 1s. Dunno what happens if you say 0s.


Thanks for that. I intended to include {0s} in the parameters, but obviously I missed that out.

I've been experimenting and

!condition = ${readsocket{inet:example.co.uk:2345}{data}{0s}}

seems to work for my usage.

Neil