in my SoftlabsAV package, I am creating an unique ID number for each
mail, including the mail's processing date and time with an accurancy
of at least to the second. That ID will be in the format
"YYYYMMDD-hhmmss.xxxxxx" where the x's are either 6-digits
microseconds (if supported by the OS), or 5-digits Process-ID
The use of microseconds will not guarantee uniqueness, if the script
is run on a multi-cpu system, and the script does not otherwise
serialize the part that creates the file name. The use of a pid
is more bullet proof becuase it is unlikely (based upon the way
most Un*x implementations assign pids that the process creating
file N, exits and a new process creates file N+1, and both processes
would happen to be assigned the same pid, all within the same second.
Still, it is theoretically possible, so neither approach is
iron clad. Probably using both microseconds and the pid is nearly
certain not cause a name clash (again, as long as the operator doesn't
set the time back, which has been known to happen).
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail