正确的电子邮件标题用于发送邮件列表邮件 [英] Correct email headers for delivering mailing list mail

查看:378
本文介绍了正确的电子邮件标题用于发送邮件列表邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个应用程序,允许用户将邮件发送到动态创建的邮件列表。例如,用户可以发送电子邮件至my-team@site.com(该网站是体育联盟的联盟管理网站),该电子邮件将发送给该​​用户团队的所有人。我想弄清楚电子邮件标题应该如何正确传递电子邮件,并使所有的From和To字段都显示正确。



在Gmail中,当您收到邮件列表中的电子邮件(我正在查看来自Google群组的电子邮件)时,它表示来自发送者它被发送到列表地址,但电子邮件已发送给我。我的地址不会出现在任何标题中,但在Delivered-To:标头中。这是一些Google的魔法,还是我可以做同样的事情?



奖金问题:我正在使用Postfix + OpenDKIM来签署电子邮件。如果发件人域与我指定的域匹配,则它将签名,但如果发件人域匹配则不会。如何告诉它使用发件人域名。

解决方案

From:和To:标题用于'显示目的'这是用户电子邮件应用程序中作为发件人和收件人呈现的内容)。他们不必与电子邮件消息的真实发件人/收件人相匹配,称为信封发件人/信封收件人,并在smtp协议(MAIL FROM:....RCPT TO中指定)。



示例:



邮件来自alice @ example .com,转到list@example.org,并发送至bob@example.net:



从Alice到列表服务器:



信封发件人:alice@example.com

信封收件人:list@example.org

标题:alice@example.com

标题:list@example.org



从列表服务器到bob:



信封发件人:list-bounces@example.org(所以错误消息转到列表服务器,而不是alice! )

信封收件人:bob@example.net

标题:alice@example.com(Bob认为Alice是发件人,这不被修改由列表服务器)

头呃:list@example.org(再次,不被列表服务器修改)



可选:Reply-To标题:list@example.org(所以,如果bob按回复,列表中的回复 - 列表服务器添加) - 请注意:有些人不喜欢回覆标题munging



附加标题:



某些电子邮件客户端也了解这些附加标题,并向用户提供特殊的邮件列表功能:




  • list- ID

  • 列表 - 发布

  • 列表帮助

  • 列表取消订阅

  • 列表所有者



https://www.ietf.org/ rfc / rfc2919.txt
https://www.ietf.org / RFC / rfc2369 .txt



此外,您可以添加标题

 优先权:批量

其中例如告诉智能户外实施不发送 - 的办公室回复列表。但是, RFC 2076 不鼓励这一点。


I'm writing an application that allows users to send email to dynamically-created mailing lists. For example, a user can send an email to my-team@site.com (the site is a league management site for sports leagues) and the email will be sent to everyone on that users's team. I'm trying to figure out what the email headers should be to deliver the email correctly and make all the From and To fields look right.

In Gmail, when you get an email from a mailing list (I'm looking at an email from google groups), it says that it came from the person who sent it and that it was sent to the list address, yet the email was delivered to me. My address doesn't appear in any of headers except in the Delivered-To: header. Is that some Google magic, or can I do the same thing?

Bonus question: I'm using Postfix+OpenDKIM to sign the emails. It will sign the message if the From domain matches the one I specified, but not if the Sender domain matches. How can I tell it to use the Sender domain instead.

解决方案

From: and To: headers are for 'display purposes' (this is what is presented in the users email application as sender and recipient). They don't have to match to the real sender/recipient of a email message which are called "envelope sender"/"envelope recipient" and are specified in the smtp protocol ("MAIL FROM:...." "RCPT TO...").

Example:

Mail comes from alice@example.com, goes to list@example.org and is being delivered to bob@example.net:

From Alice to The list Server:

Envelope Sender: alice@example.com
Envelope Recipient: list@example.org
From Header: alice@example.com
To Header: list@example.org

From the list Server to bob:

Envelope Sender: list-bounces@example.org (so error messages go to the list server, not to alice!)
Envelope Recipient: bob@example.net
From Header: alice@example.com (Bob sees Alice as the sender, this is not modified by the list server)
To Header: list@example.org (again, not modified by the list server)

Optional: Reply-To header: list@example.org (So, if bob presses reply, the reply goes to the list - added by the list server ) - beware: some people do not like reply-to header munging

Additional headers:

Some email clients also understand these additional headers and present special mailinglist features to the user:

  • list-Id
  • list-Post
  • list-help
  • list-unsubscribe
  • list-owner

https://www.ietf.org/rfc/rfc2919.txt https://www.ietf.org/rfc/rfc2369.txt

Also, you could add a header

Precedence: bulk

which for example tells intelligent out-of-office implementations not to send out-of-office replies to the list. But this is discouraged by RFC 2076.

这篇关于正确的电子邮件标题用于发送邮件列表邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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