Re: Message-ID as unique key?

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Steve Atkins <steve(at)blighty(dot)com>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Message-ID as unique key?
Date: 2004-10-12 16:32:28
Message-ID: 20041012163228.GF4721@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Oct 12, 2004 at 08:50:30AM -0700, Steve Atkins wrote:
> > Is the "Message-ID" header field a globally unique identifer?
>
> Not a postgresql related issue, but, yes Message-ID: is, by
> definition, a globally unique identifier. If there are two
> messages with the same Message-ID then the sender is asserting
> that those two messages are identical. See RFC 2822 section 3.6.4.

Except that they usually recommend adding the domain as part of the
message-id. This is where your problem comes in. A mail server hiding
behind a NAT firewall that's a relay and doesn't receive incoming mail
directly, is not going to have a domain. So you'll get things like
localhost.localdomain or something completely fake. Indeed, two
messages in this thread have this.

Secondly, clients creating their own message-ids are not always that
great. For example, Outlook, uses the computer name as the domain.
They're not likely to be unique worldwide either. You'd still have to
be pretty unlucky to get two the same though. It's possible Microsoft
mashes the ethernet MAC ID in there too.

The answer is, it very very close to unique, but not really guarenteed.
All mail systems I'm aware of generate their own ID's anyway, look
through the received headers...

Hope this helps,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas F.O'Connell 2004-10-12 17:14:46 Re: Reusable pl/pgsql samples ?
Previous Message Steven Klassen 2004-10-12 16:24:31 Re: connection or query affected