Ian Eiloart wrote:

> Does Exim have a random number generator?

Recent versions have the modulo operator, so you can build yourself a poor
man's RNG:
${if eq{${eval:($tod_epoch+$pid)%2}}{0}}

will give you true with a 50% (= 0.5 = reciprocal value of 2) chance (over
a sufficent long period). That's much less expensive than a regex, I'd
say.
Note that messages received within the same second over the same
connection will have the same value assigned, but that's typically not a
problem with spam.



-- 
## List details at http://www.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/

Reply via email to