Re: [exim] expansion string logic

Góra strony
Delete this message
Reply to this message
Autor: Drav Sloan
Data:  
Dla: exim-users
Temat: Re: [exim] expansion string logic
Stephen Gran wrote:
> > ./bin/exim -d -be '${if and { \
> >    { isip{151.115.203.35}{true}{false} }\
> >    { !eq{151.115.203.35}{127.0.0.9} }\
> >    }\
> > }'

>
> The {true}{false} is implicit, so remove them. Otherwise, you're pretty close.
> Try:
> ${if and { { isip{151.115.203.35} } { !eq{151.115.203.35}{127.0.0.9} } } }


*sigh*

It appears that if I use newlines on the command line it breaks the string expansion:

# ./bin/exim -be '${if and{ \
   { isip{151.115.203.35} } \
   { !eq{151.115.203.35}{127.0.0.9} } \    
   } \  
}'
Failed: each subcondition inside an "and{...}" condition must be in its own {}


Yet without them:

# ./bin/exim -be '${if and { { isip{151.115.203.35} } { !eq{151.115.203.35}{127.0.0.9} } } }'
true

That Works.

Thanks for looking at this though, I wasn't loosing my mind after all!

Regards

Drav.