Re: [exim] Setting ACL variable to a random string

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Phil Pennock
Dátum:  
Címzett: Florian Weimer
CC: exim-users
Tárgy: Re: [exim] Setting ACL variable to a random string
On 2007-12-31 at 13:58 +0100, Florian Weimer wrote:
> I've just discovered that $message_exim_id is not set when RCPT TO:s
> are checked. However, I need some kind of unique ID at this stage.
> It needs not be related to the future value of $message_exim_id, it's
> sufficient if it's (very likely) unique.
>
> Is there a better way to achieve this than using something like
> ${readfile{/proc/sys/kernel/random/uuid}{\n}}?


Not really; you could trade off portability for extra compilation work
by putting some useful functions in a dynamically-loaded library and use
${dlfunc}; ${perl} would be overkill.

The timestamp in $message_exim_id is that of the time taken after DATA
is received and responded to and Exim is about to start receiving the
message. Exim doesn't have any variables for things like "current
time", so you can't fake it without adding time fetchers in.

Sorry, looks like you've found the simplest solution, albeit
Linux-specific.

-Phil