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

Góra strony
Delete this message
Reply to this message
Autor: Mike Cardwell
Data:  
Dla: exim-users
Temat: Re: [exim] Setting ACL variable to a random string
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}}?


You could concatenate the timestamp with the process id and the number
of rcpt commands received. Eg:

$tod_epoch.$pid.${eval:$rcpt_count+$rcpt_defer_count+$rcpt_fail_count}

That should be unique...

Mike