RE: [Exim] "3.3" is not a number

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Eli
Dátum:  
Címzett: 'Mike', exim-users
Tárgy: RE: [Exim] "3.3" is not a number
If you're using exiscan, the other emails are the answer (use the _int
variable to get a "number").

If you're not - I haven't tried this, but it's worth experimenting if you're
still stuck...

Using {match ...}, you should be able to do a very simple regex like
^(\d+)\. to get the first part of the number - it won't be as accurate as
rounding up/down properly, but you at least get a "number" which hopefully
Exim treats as such. You could even get tricky and maybe use a regex like
^(\d+)\.(\d)$, then do a test on $2 (or is it $1 - the 2nd number matched)
and if it's greater than 4, add 1 to the first number - thus making an
actual rounding effect.

No idea if that works - just thinking weird stuff up :)

Eli.

-----Original Message-----
From: exim-users-admin@??? [mailto:exim-users-admin@exim.org] On Behalf
Of Mike
Sent: Tuesday, January 27, 2004 11:05 PM
To: exim-users@???
Subject: [Exim] "3.3" is not a number

Hello,

I'm working on a system for supporting per-user warn/reject SA scores, using
the
spamc client with Exim.

I have one section that pulls the user warn/reject scores, from a db file,
into acl
variables, then I compare them with the spam-score header- so:

${if>={$h_x-spam-score:}{$acl_m0}{1}{0}}

I'm having a problem, it looks like, with real numbers- ie- when the spam
score
comes back as 3.3 I am unable to *compare* it with the value I pull from the
db
file.

I end up getting the "3.3 is not a number" error when it tries to expand-

I've seen a few other posts about this, but none of them had any
resolutions- I
also saw the post from Philip about putting this on the wish list.

I trired using

${if>={${eval:$h_x-spam-score: * 1000}}{$acl_m0}{1}{0}}

but obviously, that would have the same problem expanding also-

Is there any other way around this? perhaps a way to *cast* it has a
integer?
or some way of getting the "thousandths" value (as Phillip suggested)?

Any suggestions would be great

Thanks,

Mike Pultz
mike@???


--

## List details at http://www.exim.org/mailman/listinfo/exim-users Exim
details at http://www.exim.org/ ##