如何转发带有原始标头的电子邮件?

发布于 2024-11-09 22:52:11 字数 1030 浏览 0 评论 0 原文

我正在编写一个程序,该程序会轮询传入邮箱(任何知道该邮箱的人都可以向该邮箱发帖),重新格式化信息,然后根据预定义的约定将邮件转发到正确的地址。例如,传入的邮件具有:

From = "[email protected]"
To = "[email protected]"
Subject = "Subject"
Body = "[email protected]+newline+Body"

然后我接收该电子邮件,保留“发件人”和“主题”字段,但将“收件人”地址更改为 [email protected],并根据我的模板格式化正文的其余部分。

到目前为止一切正常 - 但我预计收件人域上的垃圾邮件过滤器会出现问题,因为它们可能会做出反应,就好像我在欺骗“发件人”地址一样。

完整保留原始邮件标头的正确方法是什么,以便所有 SPF/DKIM 标头保留在外发电子邮件上,并且收件人域不会将传入邮件视为可能的垃圾邮件/网络钓鱼邮件?

I am writing a program that polls an incoming mailbox (to which anyone who knows about it can post), reformats the info, then forwards the mail on to the correct address according to a predefined convention. For example, the incoming mail has:

From = "[email protected]"
To = "[email protected]"
Subject = "Subject"
Body = "[email protected]+newline+Body"

Then I take that email, preserve the "From" and "Subject" fields, but I change the "To" address to [email protected], and format the rest of the body according to my template.

Thus far all OK - but I anticipate a problem with spam filters on the recipient domains, since they may react as if I'm spoofing the "From" address.

What is the correct way to preserve the headers from the original mail intact, such that all the SPF/DKIM headers remain on the outgoing email, and the recipient domains don't treat the incoming mail as possible spam/phishing mails?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文