电子邮件发件人,收件人和退货路径值之间有什么区别?
示例:我有一个联系表单,用户可以在其中输入电子邮件,是将其分配给发件人,来自还是返回路径?
我在StackOverflow上快速搜索,找不到任何有用的东西.
Sha*_* D. 158
因此,在提交邮件时通过SMTP,SMTP信封(发件人,收件人等)与邮件的实际数据不同.
该Sender头被用来提交它谁在消息中识别.这通常与From标题相同,标题是消息的来源.但是,在邮件代理代表其他人发送邮件的某些情况下,它可能会有所不同.
所述Return-Path报头用于指示到接收方(或接收MTA),其中未送达收据要被发送.
例如,使用允许用户从网页发送邮件的服务器.因此,sender@yourcompany.com在消息中键入并提交它.然后,服务器将消息发送到其收件人,From设置为sender@yourcompany.com.实际的SMTP提交使用不同的凭据,例如mailagent@mywebmail.com.因此,sender标头设置为mailagent@mywebmail.com,以指示From标头不指示实际提交消息的人.
在这种情况下,如果无法发送消息,则代理可能更好地接收未送达报告,因此Return-Path也将设置为mailagent@mywebmail.com使任何递送报告转发给它而不是发送者.
如果你这样做,一个表单提交发送电子邮件,那么这可能与你设置标题的方式直接并行.
nai*_*rch 89
可以在此处找到定义此规范的官方RFC:
http://tools.ietf.org/html/rfc4021#section-2.1.2(见2.1.2.及以下段落)
2.1.2.标题字段:来自
Run Code Online (Sandbox Code Playgroud)Description: Mailbox of message author [...] Related information: Specifies the author(s) of the message; that is, the mailbox(es) of the person(s) or system(s) responsible for the writing of the message. Defined as standard by RFC 822.2.1.3.标题字段:发件人
Run Code Online (Sandbox Code Playgroud)Description: Mailbox of message sender [...] Related information: Specifies the mailbox of the agent responsible for the actual transmission of the message. Defined as standard by RFC 822.2.1.22.标题字段:返回路径
Run Code Online (Sandbox Code Playgroud)Description: Message return path [...] Related information: Return path for message response diagnostics. See also RFC 2821 [17]. Defined as standard by RFC 822.
cme*_*eid 19
对此的一个小更新:发件人不应该设置Return-Path:标头.Return-Path:传输中的消息没有标题.该标头由进行最终传送的MTA设置,并且通常设置为该值,5321.From除非本地系统需要某种奇怪的路由.
这是一种常见的误解,因为用户很少看到邮箱中没有Return-Path:标题的电子邮件.这是因为他们总是看到已传递的消息,但MTA永远不会Return-Path:在传输中的消息上看到标头.见http://tools.ietf.org/html/rfc5321#section-4.4