Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!sdd.hp.com!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!daemon From: palkovic@linac.fnal.gov (John Palkovic) Newsgroups: news.software.b Subject: Re: Ideas for Message-ID's Message-ID: <+AK#+&|@linac.fnal.gov> Date: 22 Mar 91 19:48:35 GMT References: <3427@litchi.bbn.com> <1991Mar22.050749.22115@looking.on.ca> Sender: daemon@linac.fnal.gov (The Background Man) Reply-To: "John Palkovic" Organization: Bob's School of Quantum Mechanics Lines: 39 In-Reply-To: brad@looking.on.ca's message of 22 Mar 91 05:07:49 GMT Nntp-Posting-Host: linac.fnal.gov >>>>> On 22 Mar 91 05:07:49 GMT, brad@looking.on.ca (Brad Templeton) said: > Is there any reason for the message-id to be readable? ... Why should the headers be readable? The articles usually aren't. :-) How about this little subroutine? Look in the header of this article for an example. As long as pid's don't repeat in 60 sec it is fine. /* * The following was inspired by a program apparently written by Jon Zeeff * (zeeff@b-tech.ann-arbor.mi.us). Palkovic@linac.fnal.gov, 3/16/91. */ /* * A string of some valid message id characters */ char string[] = "!#$%^&*_+|-=~`{}'?ABCDFGHJKLMNPQRSTVWXYZ1234567890"; #define size (sizeof(string) - 1) void rand_id(s) char *s; { int getpid(); long num; num = (time((long *) 0) - 658216800)/60; do { *s++ = string[num % size]; num /= size; } while (num); num = (long) getpid(); do { *s++ = string[num % size]; num /= size; } while (num); }