哪些标头总是在回复/转发中返回? [英] Which headers are ALWAYS returned in a reply/forward?

查看:12
本文介绍了哪些标头总是在回复/转发中返回?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个集成了客户服务的网上商店.每隔几分钟,系统会将电子邮件检索到数据库中,解析标题并将消息与客户和订单相关联.

I'm making a webstore with integrated customer service. Every few minutes, the system will retrieve emails into the database, parsing headers and relating the message to customers and orders.

客户线程通过消息 From: 标头相当可靠.但是订单呢?似乎大多数人使用 Reply-To: 标头来处理订单...

Customer threading is fairly reliable via the messages From: header. But what about orders? It seems most people use the Reply-To: header for threading orders ...

From: <orders@company.com>
To: <person@place.com>
Subject: Company Order #314159
Reply-To: <order-314159@company.com>

但是一个凌乱的 Reply-to: 会使事情变得模糊和丑化,并且可能会标记垃圾邮件传感器或其他东西.我绝对不想指望 Subject: 字段,人们一直在修改主题,即使在回复时也是如此.还有其他似乎适合该工作的标题,例如 ...

But a messy Reply-to: obscures and uglifies things, and probably flags spam sensors or something. I definitely don't want to count on the Subject: field, people modify the subject all the time, even when replying. There are other headers that seem suited to the job, like ...

From: <orders@company.com>
To: <person@place.com>
Subject: Company Order #314159
Message-ID: <314159-2>

...或...

In-Reply-To: <314159-1>

但是当这个人回复时,这些会被退回吗?是否有任何标题(除了Reply-To:)被可靠地复制到回复和转发中?

But are these sent back when the person reply? Are there any headers (other than Reply-To:) that are reliably copied into replies and forwards?

推荐答案

您不能完全依赖保存的标头.回复或转发时,邮件客户端会创建一条新消息;该邮件客户端可以完全合法地忽略或更改任何认为合适的内容.

You can't rely entirely on headers being preserved. When replying or forwarding, a mail client creates a new message; that mail client can quite legitimately ignore or alter any content, as deemed appropriate.

您可能可以通过以下方式进行跟踪,但都容易受到更改(主要是用户,但也有原始邮件客户端).你真的应该用它们来做出最好的猜测.

You might be able to track by the following means, but all are vulnerable to alteration (mainly by the user, but also by a primitive mail client). You should really just use them to make a best-guess.

  1. 一次性回复地址.从理论上讲,如果您愿意,您也可以使用发件人"来执行此操作,但是回复"更好地确保用户(及其邮件服务器/客户端)识别出它来自您并采取适当的行动.我认为垃圾邮件过滤器没有理由关心一次性地址.鉴于大多数垃圾邮件无论如何都使用虚假地址并且不关心回复,这并不是真正的垃圾邮件发送者技巧.它不太可能导致垃圾邮件过滤的大幅增加.对与您的发件人地址相同的域使用回复也不太可能看起来可疑.
  2. 一个独特的主题.是的,它可以很容易地更改,但通常会附加而不是删除现有的主题(特别是如果它显然包含某种参考编号).您可以应用正则表达式匹配 - 可能仅将其用作其他检测方法的确认.
  3. 正文中的唯一字符串(可能前面有请勿删除此行"字样)
  4. In-Reply-ToReference 标头在受支持时可能没问题.用户很有可能会将他们的回复复制到新的空白邮件中并丢弃标题.
  1. A disposable Reply-To address. Theoretically, you can also do it with "From" if you want, but Reply-To is better to ensure the user (and their mail server/client) recognise it's from you and act appropriately. I see no reason why a spam filter would care about disposable addresses. Seeing as most spam uses fake addresses anyway and doesn't care about replies, it is not really a spammer trick. It's unlikely to cause a substantial increase in spam filtering. Using a Reply-To for the same domain as your From address is also unlikely to look suspicious.
  2. A unique subject. Yes, it can easily be changed, but usually the existing subject is appended to, rather than deleted (especially if it obviously contains some kind of reference number). You could apply a regular expression match - maybe only using it as a confirmation of your other detection methods.
  3. A unique string in the body (possibly preceded by the words "DO NOT REMOVE THIS LINE")
  4. The In-Reply-To and Reference headers are probably fine, when supported. There is a small chance that a user will copy their reply into a new blank message and trash the headers anyway.

这篇关于哪些标头总是在回复/转发中返回?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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