Re: [exim] address_data / used multiple times causes issues

Top Page
Delete this message
Reply to this message
Author: Jeremy Harris
Date:  
To: exim-users
Subject: Re: [exim] address_data / used multiple times causes issues
On 22/10/13 13:19, Rob Gunther wrote:
> I'm trying to do some SRS work.
>
> I do something like this:
>
>    address_data = ${readsocket{/tmp/srsd}\
>                  {FORWARD $sender_address_local_part@$sender_address_domain
> sample.com\n}\
>                                          {5s}{\n}{:defer: SRS daemon
> failure}}
>    errors_to = ${quote_local_part:${local_part:$address_data}}@
> ${domain:$address_data}

>
>
> It sends the original sender address out to the SRSD, which returns a new
> sender address. That address is then set to errors_to so the envelope
> address is changed.
>
> Problem is I now am trying to use address_data later in another router. If
> I do that, it seems to wipe out the errors_to value that was set in the
> code above. I know the router ran but the new errors_to does not stick.
>
> When I call the readsocket to the SRSD can I store the result in some other
> usable variable?


Not conveniently in a router, in current exim versions[1]. Could you
make the call in an ACL?

[1] Future versions permit you to call an ACL from a string-expansion,
which you could use for the side-effect of setting a variable. I've not
tested it but such a variable would probably be then readable from
succeeding routers.

-- 
Cheers,
    Jeremy