Re: [exim] Random number generation in an ACL

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Chris Lightfoot
Datum:  
To: Ian P. Christian
CC: exim-users
Betreff: Re: [exim] Random number generation in an ACL
On Thu, Jul 06, 2006 at 05:40:00PM +0100, Ian P. Christian wrote:
> Hi all,
>
> I want to do a database cleanup in my exim config, so there's a 1 in 10,000
> chance some SQL will be run - I could cron it, but I prefer the config to be
> self-contained.
>
> To do this, I obviously need to generate a random number - is this possible in
> the ACLs? I've hacked it in using perl at the moment, but I'm just curious as
> to if I've missed anything - a built in ACL function or something.


Does your database have a rng function? If so you can call
through to that. I don't think there's one in Exim exposed
to the string expansion functions (at least, I couldn't
find one when I looked the other day).

-- 
``Acts of violence do not help, [whichever] part
  of the world they might take place in....''    (John `Two Jabs' Prescott)