Re: [exim] protected addresses ACL

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Giles Constant
Date:  
À: exim-users
Sujet: Re: [exim] protected addresses ACL
On Thursday 03 Feb 2005 12:30, you wrote:
> On Thu, 3 Feb 2005, Giles Constant wrote:
> > > condition = ${stat:filename}
> >
> > I tried that - according to the manual, stat 'fails' if the file doesn't
> > exist.
>
> Why is this a problem? Expansion failure results in the condition being
> false, which is what you want.


It wasn't false, it was "fail".. It was throwing 451 "Temporary local
problem":

2005-02-03 11:22:11 H=[127.0.0.1] F=<foo@???> temporarily rejected
RCPT slkfj@???: failed to expand ACL string
"${stat:/path/$domain/protected-addresses}":
stat(/path/dfjsd.com/protected-addresses) failed: No such file or directory

> > I guessed you might have meant 'exists', but that also seems to fail
> >
> >    condition = exists{/path/$domain/protected-addresses}

>
> exists is an expansion condition, so it must be used with ${if :
>
>   condition = ${if exists{/path/$domain/protected-addresses} \
>                    {yes} {no} }


That's what I now have (I spotted the mistake about 30 seconds after posting -
don't you just hate it when that happens? :-))

Thanks for the help anyway.. works now!

--