Ok, if it leaves the error "failed to connect..." in a variable, then I
can test that. What variable??
Please respond to exim-users@???
To: Dan_Mitton@???
cc: exim-users@???
Subject: Re: [exim] readsocket
LSN: Not Relevant
User Filed as: Not a Record
On Wed, 17 Jan 2007, Dan_Mitton@??? wrote:
> Thanks for the reply. I am trying to use readsocket in an ACL (below).
> This code snippet is from an example way of implementing SPF within
Exim.
> With your example, does the expansion result in "Failed: ..." or is that
> just an error message output somewhere?
The expansion does not result in "Failed: ...". The expansion fails, and
it leaves the error "failed to connect.." in a variable. The output you
see in my test is written by the -be processing code.
> Are the exact failure messages documented somewhere?
The one in my example is the output from strerror(errno), so is a
standard system message. I think most of the socket errors are of this
type.
> Would using an inet socket would better?
Dunno, I'm afraid.
> warn set acl_m9 = ${readsocket{/tmp/spfd}\
If the readsocket expansion fails, Exim should set up a message for
logging, containing the text "failed to expand ACL string ... <details>"
Which ACL is this called from? Looking at the code, it should return an
error indication from the attempt to run the ACL, and this should
normally show the message.
--
Philip Hazel University of Cambridge Computing Service
Get the Exim 4 book: http://www.uit.co.uk/exim-book