Martin A. Brooks wrote:
> Hi
>
> I have an ACL condition that sets a variable in order to allow for
> per-domain rejection messages. The ACL looks like this:
>
> warn set acl_m99 = Not accepted.
> warn set acl_m99 = ${readfile{$domain/reject-message}{}}
> condition = ${if exists{$domain/reject-message}}
>
>
> The "condition=" line appears to be being ignored as, when a mail
> arrives for a domain I don't deal with, I see in the logs:
>
> failed to expand ACL string "${readfile{$domain/reject-message}{}}"
>
>
> As, obviously, this file does not exist as it's not a domain I know about.
>
> Did I miss something obvious here?
>
> Thanks
>
> Martin.
>
Put the condition *before* the expansion, so that it exits when:
'${if exists... (NOT)
... and does not attempt to (re) set the variable.
Bill