消息ID作为唯一键? [英] Message-ID as unique key?

查看:100
本文介绍了消息ID作为唯一键?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在和Andrew Stuarts一起玩Catchmail。程序

将电子邮件存储到postgresql数据库。


我想避免多次插入同一封电子邮件...

(电子邮件的片段实际上放在几张

表中)。


是消息ID标题字段是一个全球唯一的标识符?


我最终希望在我的收件箱中有一个cron作业进程而且不要
想要连续的cron任务来保持重新 - 输入同样的电子邮件:)


Jerry

---------------------- -----(广播结束)---------------------------

提示3:如果发布/通过Usenet阅读,请发送适当的

subscribe-nomail命令到 ma ****** *@postgresql.org 以便您的

消息可以干净地通过邮件列表

Hi,
I am futzing around with Andrew Stuarts "Catchmail" program
that stores emails into a postgresql database.

I want to avoid inserting the same email more than once...
(pieces of the email actually get emplaced into several
tables).

Is the "Message-ID" header field a globally unique identifer?

I eventually want to have a cron job process my inbox and don''t
want successive cron tasks to keep re-entering the same email :)

Jerry
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

推荐答案

不,它不是全局唯一标识符。事实上你甚至不能确定

它将永远存在于所有邮件中,具体取决于你的邮件处理

chain。大多数电子邮件客户端都会添加一个,而大多数邮件转发代理商也会添加一个如果丢失,但是没有一般的

规则如何创建邮件ID。通常它对于生成它的用户/传输代理的特定实例将是唯一的,因为它确实用于确定邮件实例上的邮件实例。

代理商实例,但仅此而已。

所以:不要将它用作唯一标识符。


干杯,

Csaba。


在星期二,2004-10-12 17:01,Jerry LeVan写道:
No, it''s not a global unique identifier. In fact you cannot even be sure
it will always be there in all mails, depending on your mail processing
chain. Most of the email clients will add one, and most of the mail
transfer agents will also add one if missing, but there''s no general
rule of how to create the mail id. Usually it will be unique for the
specific instance of the user/transfer agent which generates it, as it
serves for exact this purpose, to identify the mail instance on the
agent instance, but nothing more.
So: don''t use it as a unique identifier.

Cheers,
Csaba.

On Tue, 2004-10-12 at 17:01, Jerry LeVan wrote:
<我正在和Andrew Stuarts一起讨论Catchmail。程序
将电子邮件存储到postgresql数据库中。

我想避免多次插入同一封电子邮件......
(电子邮件的片段实际上被安排到几个
表格。

是消息ID吗?标题字段是一个全球唯一的标识符?

我最终希望在我的收件箱中有一个cron作业进程,并且不希望连续的cron任务继续重新输入相同的电子邮件:)

Jerry

---------------------------(播出结束) - -------------------------
提示3:如果通过Usenet发帖/阅读,请发送相应的
订阅 - 无邮件命令 ma*******@postgresql.org ,以便您的消息可以通过干净地到邮件列表
Hi,
I am futzing around with Andrew Stuarts "Catchmail" program
that stores emails into a postgresql database.

I want to avoid inserting the same email more than once...
(pieces of the email actually get emplaced into several
tables).

Is the "Message-ID" header field a globally unique identifer?

I eventually want to have a cron job process my inbox and don''t
want successive cron tasks to keep re-entering the same email :)

Jerry
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly



---------------------------(播出结束) - --------------------------

提示7:别忘了增加免费空间地图设置


---------------------------(end of broadcast)---------------------------
TIP 7: don''t forget to increase your free space map settings


在星期二,2004-10-12 17:01,Jerry LeVan写道:
On Tue, 2004-10-12 at 17:01, Jerry LeVan wrote:

我与安德鲁·斯图亚特(Andrew Stuarts)的Catchmail相关程序
将电子邮件存储到postgresql数据库中。

我想避免多次插入同一封电子邮件......
(电子邮件的片段实际上被安排到几个
表格。

是消息ID吗?标题字段是全球唯一标识符?


应该是这样,是的。除非你遇到一个破碎的客户

或MTA。

我最终希望我的收件箱有一个cron作业流程,并且不希望连续的cron任务到继续重新输入相同的电子邮件:)
Hi,
I am futzing around with Andrew Stuarts "Catchmail" program
that stores emails into a postgresql database.

I want to avoid inserting the same email more than once...
(pieces of the email actually get emplaced into several
tables).

Is the "Message-ID" header field a globally unique identifer?
Its supposed to be that, yes. Unless you meet a broken client
or MTA.
I eventually want to have a cron job process my inbox and don''t
want successive cron tasks to keep re-entering the same email :)




为什么不是用户代表

接收邮件的脚本?是时候运行一些垃圾邮件检查程序。


问候

Tino



---- -----------------------(播出结束)---------------------- -----

提示5:您是否检查了我们广泛的常见问题解答?

http://www.postgresql.org/docs/faqs/FAQ.html



Why not a script which receives the mail in behalf of
the user? Time to run some spam checkers too.

Regards
Tino


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html


Jerry LeVan< je ********* @ eku.edu>写道:
Jerry LeVan <je*********@eku.edu> writes:

我正在和Andrew Stuarts一起讨论Catchmail。程序
将电子邮件存储到postgresql数据库中。

我想避免多次插入同一封电子邮件......
(电子邮件的片段实际上被安排到几个
表格。

是消息ID吗?标题字段是一个全局唯一标识符?
Hi,
I am futzing around with Andrew Stuarts "Catchmail" program
that stores emails into a postgresql database.

I want to avoid inserting the same email more than once...
(pieces of the email actually get emplaced into several
tables).

Is the "Message-ID" header field a globally unique identifer?




它的目的是,但由于它是由MUA或

生成的第一个MTA看到这条消息,有很多空间可以用来破坏软件。


-Doug

- -

让我们过河,在树荫下休息。

--T。 J. Jackson,1863


---------------------------(播出结束) - --------------------------

提示4:不要杀掉-9的邮政局长



It is intended to be, but since it is generated by either the MUA or
the first MTA that sees the message, there is a lot of scope for
broken software to screw things up.

-Doug
--
Let us cross over the river, and rest under the shade of the trees.
--T. J. Jackson, 1863

---------------------------(end of broadcast)---------------------------
TIP 4: Don''t ''kill -9'' the postmaster


这篇关于消息ID作为唯一键?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆