Re: [exim] data acl expansion question

Pàgina inicial
Delete this message
Reply to this message
Autor: grover mitchell
Data:  
A: Exim-users
Assumpte: Re: [exim] data acl expansion question
On Wed, 23 Feb 2005 18:58:46 -0800, grover mitchell
<baguagrover@???> wrote:
> On Thu, 24 Feb 2005 03:46:40 +0100, Jakob Hirsch <jh@???> wrote:
> > grover mitchell wrote:
> >
> > > condition = ${if eq{${run{/usr/local/bin/ispam $message_headers
> > > $message_body}}}{SPAM}{1}{0}}
> > >
> > > however, the result seems to always be 0, regardless of the output of
> > > the external program. Can anyone tell me what I am doing wrong?
> >
> > Are you sure that the program writes just "SPAM" and not "SPAM\n"?
> > That's a difference for the eq condition.
>
> Brilliant, the problem was the \n. Thanks!
>


Is it possible to use a regular expression in the above condition? The
external program returns a value such as

[0] OK... HAM [-20:3:64] 131ms

I need to be able to match just the beginning of the output. I tried
the following, but it does not match.

condition = ${if eq{${run{/usr/local/bin/ispam $message_headers \
$message_body}}}{/^\[1\]/}{1}{0}}