Re: Message-ID as unique key?

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Message-ID as unique key?
Дата
Msg-id 20041012163228.GF4721@svana.org
обсуждение исходный текст
Ответ на Re: Message-ID as unique key?  (Steve Atkins <steve@blighty.com>)
Список 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@svana.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.

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Steven Klassen
Дата:
Сообщение: Re: connection or query affected
Следующее
От: Thomas F.O'Connell
Дата:
Сообщение: Re: Reusable pl/pgsql samples ?