Document: message-id.txt
Version: 001
Date: 2002-10-28
Message-ID
A new standard for unique message identifiers
October 28, 2002
andrew clarke
3:633/285.4@FidoNet
mail@ozzmosis.com
@MSGID: 3:633/284.5 3dbda568
@REPLY: 3:633/285.4@fidonet 3dbd56c7
@CHRS: IBMPC 2
@SEEN-BY: 10/3 105/360 106/1 2000 123/500 124/5025 140/1
154/15 201/505 396/45
Hi andrew!
28 Oct 30 15:24, andrew clarke wrote to All:
Document: message-id.txt
Version: 001
Date: 2002-10-28
Message-ID
A new standard for unique message identifiers
October 28, 2002
andrew clarke
3:633/285.4@FidoNet
mail@ozzmosis.com
Got here, but I am unsure if and how this echo is connected to
the rest of the world. Have to check that now...
Cheers
Ger Vloothuis
ICQ:103-106-035
--- GoldED/W32 3.0.1
* Origin: Teletechnique BBS ttq.darktech.org (3:633/284.5)
@SEEN-BY: 3634/12
@PATH: 633/284 285 260 774/605 123/500 106/2000
FTS-9 MSGIDs are not unique enough to be accurately relied upon. In particular you the operator of a system runs the risk of generating
duplicate MSGIDs when using two or more different programs concurrently
that generate one, particularly when those programs use C's time(NULL) function as a seed value to generate the hex value of the MSGID, which
is quite common. time(NULL) can differ greatly between implementations.
[\x01Message-ID:][space][YYYY][MM][DD][HH][MM][SS][RR...][space][address][ne
ne]
This format is similar to that used in Internet mail.
in any case, my system has already forwarded this on to 2:201/329 for further distribution...
FTS-9 MSGIDs are not unique enough to be accurately relied upon. In
particular you the operator of a system runs the risk of generating
duplicate MSGIDs when using two or more different programs concurrently
that generate one, particularly when those programs use C's time(NULL)
function as a seed value to generate the hex value of the MSGID, which
is quite common. time(NULL) can differ greatly between
implementations.
As a general rule, implementations for specific languages shouldn't be mentioned in documents. I'd avoid this particular comment especially, since it makes no sense. (time(NULL) must, by definition, be the same
in any implementation.)
For that matter, there's not much point in having the originating
address in the spec either. That's specified elsewhere, is open to misinterpretation and abuse, and is, in particular, used for different purposes in different implementations. (FTS-9 specifically does not specify what the originating address format is, and gating software has
put this to good use in assigning originating addresses which reflect
the internet address of the message rather than the Fido one.)
This format is similar to that used in Internet mail.
IMHO, you're just tampering with a good thing, i.e. the internet style Message-ID line. Simply, make it:
Message-ID: <unique message identifier>
where <unique message identifier> is *ANY* string not containing a
newline or a ^A.
Provide the time thing as a suggestion for helping to generate
unique IDs, but also point out that time alone is no guarantee.
Beyond that, let the implementor choose his/her own method.
Another possible note is that IDs which satisfy the MSGID standard
are a strict subset of this one.
As a general rule, implementations for specific languages shouldn't be
mentioned in documents. I'd avoid this particular comment especially,
since it makes no sense. (time(NULL) must, by definition, be the same
in any implementation.)
From the C standard:
"The time function determines the current calendar time. The
encoding of the value is unspecified."
Programmers tend to just convert the value returned to an
unsigned long and be done with it, unfortunately.
FTS-9 MSGIDs are not unique enough to be accurately relied upon.
Implementations that generate a Message-ID may also optionally
generate a MSGID conforming to the FTS-9 standard for systems that
do not recognise the Message-ID.
Bye <=-
From the C standard:
"The time function determines the current calendar time. The
encoding of the value is unspecified.
OK. RFC822 does actually specify a local part and a domain part
separated by '@' for the Message-ID but I can see why this might
just confuse the issue in FidoNet
True. I'm not sure I want to encourage their use though!
Bye <=-
FTS-9 MSGIDs are not unique enough to be accurately relied upon.
sure they are, FTS-9 says they don't reapeat for three years,
of course many implementations don't ensure that.
IMO what's needed is a proper implementation of FTS-9
eg using sequential numbers from a single source for all the messagids
on the system.
At it simplest This means about 15 lines of C. (or pascal, bssic etc)
in each program where they generate the message-ids, and a key file somewhere where all the mail processors can reach it,
Maybe another kludge could be added to indicate the the msgid so
generated is guaranteed to be unique.
Implementations that generate a Message-ID may also optionally
generate a MSGID conforming to the FTS-9 standard for systems that
do not recognise the Message-ID.
is there going to be a replacemnt to the REPLY kludge too ?
one solution to different applications generating matching msgids is to
give the different appications diffrerent addresses - eg give the news autoposter a point address so it can't clash with the message editor.
From the C standard:
"The time function determines the current calendar time. The
encoding of the value is unspecified.
true, but all C implementations that I'm aware of return "unixtime"
(seconds since 1/1/1970 GMT) either as a long (or posibly as a float
in some cases?)
OK. RFC822 does actually specify a local part and a domain part
separated by '@' for the Message-ID but I can see why this might
just confuse the issue in FidoNet
I can't, explain why.
Another possible note is that IDs which satisfy the MSGID standard
are a strict subset of this one.
True. I'm not sure I want to encourage their use though!
if you can fix FTS-9 we only need to replace half our software to be compatible. for something new it all needs to be fixed. :)
Good in theory, but not going to work if you don't have the source
code to everything unfortunately.
I guess the good thing about this is that more and more people are
using open source FTN software, if not most of them, so there may be
hope yet
It could be unreliable if the key file goes missing or gets
corrupted (eg. two programs trying to write to it at once)
but is probably not such a bad solution if you decide not to generate random numbers. Particularly if the user can decide for themselves
which method to use
Although I still think a random number generator seeded with the
year + month + day + hour + minute + second + subsecond would do a
pretty reasonable job if the string to be generated was long
enough. I guess I should do some tests
In any case Charles Cruden's idea of basically allowing any unique
string seemed the most logical in hindsight. You could then have
a combination of user-supplied-data + random number + MD5 of the
message text, or any other combination you wanted to use..
May as well invent a new kludge that does both. ;-)
Implementations that generate a Message-ID may also optionally
generate a MSGID conforming to the FTS-9 standard for systems
that do not recognise the Message-ID.
Yep.
Bye <=-
Well, the point was they can return what they like. There is also
the issue of localtime vs UTC/GMT when it comes to using seconds
since 1970-01-01 00:00
Message-ID won't stop people from using MSGID.
Bye <=-
That was another idea I toyed with, making the serial number engine pluggable... where the editor (etc) rouns an external prog to generate
the serial number.
Although I still think a random number generator seeded with theyeah, but no better than just using the year + month + day + hour +
year + month + day + hour + minute + second + subsecond would do
a pretty reasonable job if the string to be generated was
long enough. I guess I should do some tests
minute + second + subsecond
So converters will be needed for people with old software who want to
see threads, or will both MSGID always be present in messages with
with a message-id
Maybe another kludge could be added to indicate the the msgid so
generated is guaranteed to be unique.
May as well invent a new kludge that does both. ;-)
a new kludge won't be compatible with existing software.
^AMSGID is nice on it's own, but ^AREPLY is really useful.
So converters will be needed for people with old software who want to
see threads, or will both MSGID always be present in messages with
with a message-id
[ 06 Nov 02 18:52, Jasen Betts wrote to andrew clarke ]
That was another idea I toyed with, making the serial number
engine pluggable... where the editor (etc) rouns an external prog
to generate the serial number.
Or a library.
Although I still think a random number generator seeded with the
year + month + day + hour + minute + second + subsecond would do
a pretty reasonable job if the string to be generated was long
enough. I guess I should do some tests
yeah, but no better than just using the year + month + day + hour
+ minute + second + subsecond
It's better but still not guaranteed.
rand() would have to return
the same number twice in the same millisecond for this method to
fail
So converters will be needed for people with old software who
want to see threads, or will both MSGID always be present in
messages with with a message-id
I suppose the message-id could form the domain of the origaddr
part of the old msgid, since that will still allow most mail
readers to extract Z:N/F as long as they don't barf on the
length..
Bye <=-
Or a library.I had to write it to count the lines... I could turn it into a C
library fuunction, and do it in pascal too. I guess even basic too...
:)
If you're seeing it once per pkt (or other gropuping of messages)
ithere's no guarantee that it won't give the same number it gave
yesterday or last week some time. or even last year..
the easiest way to ge unique numbers is to use each number once.
the easiest way to do that is just to use them in order.
@MSGIDUNIQUE
or maybe it could go in the address part of the msgid, not sure how really.
Or a library.
I had to write it to count the lines... I could turn it into a C
library fuunction, and do it in pascal too. I guess even basic too...
:)
I use a little SQL table.. there are MySQL modules for almost any
popular (and not so popular) OS and language.. except DOS but I don't
give a fig about DOS anymore :)
Careful.. you'll upset Carol ;-)
I'm not suggesting people stop generating MSGID/REPLY.
Bye <=-
========FTN PACKET HEADER (PKT_MSG20):========
type 2
origNode 1
destNode 1
origNet 379
destNet 379
AttributeWord 0
cost 0
DateTime[20] 05 Nov 02 11:22:08
toUserName Jasen Betts
fromUserName andrew clarke
subject message-id
========FTN MESSAGE SOURCE:========
AREA:NET_DEV
@MSGID: 3:633/267@fidonet 3dc76ac0
@TZUTC: 1100
@REPLY: 3:640/531.42 1eb6d8b9
@TID: hpt 0.9.7d-stable/w32 02-01-01
Thu 2002-10-31 20:01, Jasen Betts (3:640/531.42) wrote to andrew
clarke:
FTS-9 MSGIDs are not unique enough to be accurately relied upon.
sure they are, FTS-9 says they don't reapeat for three years,
of course many implementations don't ensure that.
IMO what's needed is a proper implementation of FTS-9
eg using sequential numbers from a single source for all the messagids
on the system.
At it simplest This means about 15 lines of C. (or pascal, bssic etc)
in each program where they generate the message-ids, and a key file
somewhere where all the mail processors can reach it,
Good in theory, but not going to work if you don't have the source code
to everything unfortunately. I guess the good thing about this is that more and more people are using open source FTN software, if not most of them, so there may be hope yet!
It could be unreliable if the key file goes missing or gets corrupted
(eg. two programs trying to write to it at once) but is probably not
such a bad solution if you decide not to generate random numbers. Particularly if the user can decide for themselves which method to use.
Although I still think a random number generator seeded with the year + month + day + hour + minute + second + subsecond would do a pretty reasonable job if the string to be generated was long enough. I guess
I should do some tests.
In any case Charles Cruden's idea of basically allowing any unique
string seemed the most logical in hindsight. You could then have a combination of user-supplied-data + random number + MD5 of the message text, or any other combination you wanted to use...
Maybe another kludge could be added to indicate the the msgid so
generated is guaranteed to be unique.
May as well invent a new kludge that does both. ;-)
Implementations that generate a Message-ID may also optionally
generate a MSGID conforming to the FTS-9 standard for systems that
do not recognise the Message-ID.
is there going to be a replacemnt to the REPLY kludge too ?
Yep.
one solution to different applications generating matching msgids is to
give the different appications diffrerent addresses - eg give the news
autoposter a point address so it can't clash with the message editor.
Quite true, but not always practical.
-- mail@ozzmosis.com
--- Msged/NT 6.1.1
* Origin: Blizzard of Ozz, Mt Eliza, Victoria, Australia (3:633/267) SEEN-BY: 10/345 28/1 105/8 106/1 124/5009 143/2 150/220 205/1 229/1000 3000 SEEN-BY: 247/101 250/99 254/6 275/311 278/230 280/5003 282/4066 311/13 SEEN-BY: 322/320 343/41 362/627 379/1 1200 396/45 633/267
751/321 2604/416 @PATH: 633/267 285 260 774/605 123/500 106/2000 140/1 250/501 280/100 28/1 @PATH: 10/345 379/1
========FTN MESSAGE END============
@MSGID: 3:633/267@fidonet 3dc76ac0
@PATH: 633/267 285 260 774/605 123/500 106/2000 140/1 250/501
280/100 28/1
@PATH: 10/345 379/1
Sorry for the long quote and no reply. This message took TWO WEEKS to arrive here.
@PATH: 379/1 396/45 106/2000 123/500 774/605 633/260 285
Bizarre. Maybe somebody came back from holiday. Was it just my
message, or all the others from Z3 too?
the easiest way to ge unique numbers is to use each number once.
the easiest way to do that is just to use them in order.
Which means using a single source.
@MSGIDUNIQUE
Good idea, but rofl!
Fidonet. The amateur Microsoft.
Are you sure this unique ID is really unique? [Y/n] _
or maybe it could go in the address part of the msgid, not sure
how really.
Was it decided that three fields in MSGID would break things?
Bye <=-
Bizarre. Maybe somebody came back from holiday. Was
it just my message, or all the others from Z3 too?
There were a TON of messages that came in yesterday. I do not
know where they were stuck. As to Zone 3, that is about all
there is in here! :-)
I have a connection at Mar(c) Lewis at 1:396/45.
He connects to 1:106/2000
Mar(k) Lewis also connects at 1:106/2000
Mar(k) Lewis messages are not coming in through Mar(c) Lewis
system.
Perhaps I need to connect to Mar(k) Lewis.
Mark?
Sorry for the long quote and no reply. This message took TWO WEEKS
to arrive here.
Bye <=-
Sorry for the long quote and no reply. This message took TWO WEEKS
to arrive here.
It's a pity timestamps aren't part of the path kludge :)
i've piut ount some slow mail but that's 'cause I had no phone for a
week.
Sysop: | digital man |
---|---|
Location: | Riverside County, California |
Users: | 1,021 |
Nodes: | 17 (0 / 17) |
Uptime: | 06:34:44 |
Calls: | 502,977 |
Calls today: | 9 |
Files: | 187,512 |
D/L today: |
446 files (138M bytes) |
Messages: | 439,170 |
Posted today: | 2 |