通过带有担保ID的SMTP发送消息 [英] send message through SMTP with guarantee ID

查看:118
本文介绍了通过带有担保ID的SMTP发送消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

美好的一天!
对于如此明确"的问题,我们深表歉意.在我的程序"中,我正在通过(例如)gmail SMTP服务器发送一些电子邮件.假设我发送的每封电子邮件的标头中都包含一些(由我生成的)唯一ID.从gmail(例如,使用python imaplib)检索邮件后,我是否有机会再次获得该唯一ID(在标头中)?
谢谢

good day!
sorry for so "clear" question, let me explain. In my "program", i'm sending some emails, through (for example) gmail SMTP server. Let's pretend that every email, which i've sent, contains some unique ID (generated by me) in header. Is there any chance, after retrieving that messages from gmail (for example, with python imaplib), i will get that unique ID (in header) again?
thanks

推荐答案

通常,MTA将保留您引入的任何消息标头.中继MTA是 必需的 :

In general, MTAs will preserve whatever message headers you introduce. Relaying MTAs are required to do so:

如第6.4节所述,中继SMTP无需检查或对消息数据的标头部分或正文采取行动,不得这样做除了添加自己的"Received:"头字段(第4.4节)外并且可以选择尝试检测邮件系统中的循环(请参阅第6.3节).当然,此禁令也适用于任何修改这些标题字段或文本(另请参见第7.9节).

As discussed in Section 6.4, a relay SMTP has no need to inspect or act upon the header section or body of the message data and MUST NOT do so except to add its own "Received:" header field (Section 4.4) and, optionally, to attempt to detect looping in the mail system (see Section 6.3). Of course, this prohibition also applies to any modifications of these header fields or text (see also Section 7.9).

通常,接收方MTA也只会添加与邮件接收,垃圾邮件检查,循环检测等相关的其他头.因此,是的,无论使用哪个目标SMTP服务器(GMail或其他方式),您几乎都将是安全的.

And in general the receiving MTA will also just add further headers related to message receipt, spam checking, loop detection, and the like. So yes, you're almost certainly going to be safe regardless of which destination SMTP server you use, GMail or otherwise.

如果这些ID确实是唯一的,则您可能需要考虑将其用作您的 Message-ID 标头值.为此目的使用 Message-ID 的好处是,当用户回复您的消息时,他们通常会在其 In-Reply中包含该 Message-ID 值-要和/或 References 标头:

If the IDs truly are unique, you may want to consider using them as part of your Message-ID header value. The benefit of using Message-ID for this purpose is that when users reply to your message, they will generally include that Message-ID value in their In-Reply-To and/or References header:

消息ID:"字段提供了唯一的消息标识符,该标识符指特定消息的特定版本.这主机保证消息标识符的唯一性,即生成它(见下文).此消息标识符旨在机器可读,对人类不一定有意义.一个消息标识符恰好与特定消息的一个版本有关;消息的后续修订各收到新消息标识符.

The "Message-ID:" field provides a unique message identifier that refers to a particular version of a particular message. The uniqueness of the message identifier is guaranteed by the host that generates it (see below). This message identifier is intended to be machine readable and not necessarily meaningful to humans. A message identifier pertains to exactly one version of a particular message; subsequent revisions to the message each receive new message identifiers.

在创建广告时,使用回复中:"和参考:"字段回复邮件.它们保存原始邮件的标识符消息以及其他消息的消息标识符(例如,如果回复的邮件本身就是回复).这"In-Reply-To:"字段可用于标识消息(或邮件),新邮件是回复,而参考:"字段可用于标识以下内容的线程":对话.

The "In-Reply-To:" and "References:" fields are used when creating a reply to a message. They hold the message identifier of the original message and the message identifiers of other messages (for example, in the case of a reply to a message that was itself a reply). The "In-Reply-To:" field may be used to identify the message (or messages) to which the new message is a reply, while the "References:" field may be used to identify a "thread" of conversation.

这篇关于通过带有担保ID的SMTP发送消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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