hmLoadTopic({
hmKeywords:"RAW,RAW 绕过内容过滤器,RAW 邮件说明,RAW 邮件示例,RAW 支持的特殊字段",
hmTitle:"RAW 邮件规范",
hmDescription:"MDaemon 内在支持一个简单而强大的邮件格式，即所谓的 RAW 邮件。RAW 邮件系统的目的在于提供一个简单、标准的格式供 MDaemon 之类的软件系统用来创建远为复杂的 RFC-2822 兼容邮件。使用 RAW 之类邮件传输代理允许客户端软件把保持遵守互联网邮件标准这一复杂的工作推卸给服务器。",
hmPrevLink:"remote_server_control--general_email_controls.html",
hmNextLink:"raw_the_raw_message_specification.html#bypassingthecontentfilter",
hmParentLink:"index.html",
hmBreadCrumbs:"MDaemon 附加功能 &gt; RAW 邮件规范",
hmTitlePath:"MDaemon 附加功能 > RAW 邮件规范 > RAW 邮件规范",
hmHeader:"<h1 class=\"p_Heading1\" style=\"page-break-after: avoid;\"><span class=\"f_Heading1\">RAW 邮件规范<\/span><\/h1>\n\r",
hmBody:"<p class=\"p_BodyText\"><span class=\"f_BodyText\">MDaemon 内在支持一个简单而强大的邮件格式，即所谓的 RAW 邮件。RAW 邮件系统的目的在于提供一个简单、标准的格式供 MDaemon 之类的软件系统用来创建远为复杂的 RFC-2822 兼容邮件。使用 RAW 之类邮件传输代理允许客户端软件把保持遵守互联网邮件标准这一复杂的工作推卸给服务器。<\/span><\/p>\n\r<p class=\"p_BodyText\"><span class=\"f_BodyText\">RAW 邮件由一系列必需的和可选的文本报头后接邮件正文组成。大多数报头包括一个标记，后接用 ＜＞ 符号括起来的值。每一报头行以 ＜CRLF＞ 字符组合结尾。报头用空行与邮件正文分隔开，而且区分大小写，“<\/span><span style=\"font-family: Arial,Helvetica,sans-serif; font-style: italic; color: #010100;\">发件人<\/span><span class=\"f_BodyText\">”和“<\/span><span style=\"font-family: Arial,Helvetica,sans-serif; font-style: italic; color: #010100;\">收件人<\/span><span class=\"f_BodyText\">”是唯一必需的报头。所有的文本、报头和正文都是纯 ASCII 文本，并且必须包括在一个扩展名为“<\/span><span class=\"f_PlainText\">.raw<\/span><span class=\"f_BodyText\">”的文件中（例如“<\/span><span style=\"font-size: 1.10rem; font-family: \'Courier New\',Courier,monospace; color: #010100;\">my-message.raw<\/span><span class=\"f_BodyText\">”）。然后，为了将邮件放入队列以等候投递，请把“<\/span><span style=\"font-size: 1.10rem; font-family: \'Courier New\',Courier,monospace; color: #010100;\">*.raw<\/span><span class=\"f_BodyText\">”文件放入 MDaemon 的 RAW 队列（通常位于“<\/span><span class=\"f_PlainText\">C:\\MDaemon\\Queues\\Raw<\/span><span class=\"f_BodyText\">”）。<\/span><\/p>\n\r<h3 class=\"p_Heading3\" style=\"page-break-after: avoid;\"><a id=\"bypassingthecontentfilter\" class=\"hmanchor\"><\/a><span class=\"f_Heading2\">绕过内容过滤器<\/span><\/h3>\n\r<p class=\"p_BodyText\"><span class=\"f_BodyText\">默认情况下，RAW 邮件就像普通邮件一样穿过内容过滤器。如果希望给定的 RAW 邮件绕过过滤器，则将文件名以“<\/span><span style=\"font-size: 1.10rem; font-family: \'Courier New\',Courier,monospace; color: #010100;\">p<\/span><span class=\"f_BodyText\">”或“<\/span><span style=\"font-size: 1.10rem; font-family: \'Courier New\',Courier,monospace; color: #010100;\">P<\/span><span class=\"f_BodyText\">”开头。例如“<\/span><span style=\"font-size: 1.10rem; font-family: \'Courier New\',Courier,monospace; color: #010100;\">P_my-message.raw<\/span><span class=\"f_BodyText\">”将绕过内容过滤器，但“<\/span><span style=\"font-size: 1.10rem; font-family: \'Courier New\',Courier,monospace; color: #010100;\">my-message.raw<\/span><span class=\"f_BodyText\">”将照常经由过滤器处理。<\/span><\/p>\n\r<div style=\"text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 3.0625rem 0.8750rem 3.0000rem;\"><table style=\"background-color:#ffffe6; border:solid thin #000000; border-spacing:0;\">\n\r<tr>\n\r<td style=\"vertical-align:top; width:3.1250rem; height:3.1250rem; padding:0.3125rem; border:none\"><p class=\"p_NoFormat\"><img style=\"margin:0;width:3.1250rem;height:3.1250rem;border:none\" src=\".\/images\/lightbulb_on_50_yback.gif\"\/><\/p>\n\r<\/td>\n\r<td style=\"vertical-align:top; padding:0.3125rem; border:none\"><p class=\"p_Notes\"><span class=\"f_Notes\">绕过内容过滤器将阻止邮件被 <\/span><span class=\"f_Notes\">DKIM 签名。如果已配置 MDaemon 对所有邮件进行签名，这可能会引发某些邮件投递问题。如果希望 MDaemon 对配置为绕过内容过滤器的 RAW 邮件进行签名，则可使用下述的 <\/span><span style=\"font-size: 1.10rem; font-family: \'Courier New\',Courier,monospace;\">x-flag=sign<\/span><span class=\"f_Notes\"> 选项达到这一目的。<\/span><\/p>\n\r<\/td>\n\r<\/tr>\n\r<\/table>\n\r<\/div>\n\r<h2 class=\"p_Heading2\" style=\"page-break-after: avoid;\"><a id=\"rawheaders\" class=\"hmanchor\"><\/a><span class=\"f_Heading2\">RAW 报头<\/span><\/h2>\n\r<div style=\"text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0.5000rem 0 0.1875rem 0;\"><table style=\"border:none; border-spacing:0.1875rem;\">\n\r<tr>\n\r<td style=\"vertical-align:top; width:20.3750rem; padding:0; border:none\"><p class=\"p_ControlIndent\" style=\"margin: 0.5000rem 0 0.1875rem 0.6250rem;\"><span class=\"f_ControlIndent\">From &lt;mailbox@example.com&gt;<\/span><\/p>\n\r<\/td>\n\r<td style=\"vertical-align:top; width:17.6250rem; padding:0; border:none\"><p class=\"p_ControlIndent\" style=\"margin: 0.5000rem 0 0.1875rem 0;\"><span class=\"f_ControlIndent\">该字段为发件人的电子邮件地址。<\/span><\/p>\n\r<\/td>\n\r<\/tr>\n\r<tr>\n\r<td style=\"vertical-align:top; width:20.3750rem; padding:0; border:none\"><p class=\"p_ControlIndent\" style=\"margin: 0.5000rem 0 0.1875rem 0.6250rem;\"><span class=\"f_ControlIndent\">To &lt;mailbox@example.com [, mailbox@example.com]<\/span><span style=\"font-family: Arial,Helvetica,sans-serif; font-style: italic; color: #010100;\">&gt;<\/span><\/p>\n\r<\/td>\n\r<td style=\"vertical-align:top; width:17.6250rem; padding:0; border:none\"><p class=\"p_ControlIndent\" style=\"margin: 0.5000rem 0 0.1875rem 0;\"><span class=\"f_ControlIndent\">该字段为收件人的电子邮件地址。可指定多个收件人，互相之间用逗号隔开。<\/span><\/p>\n\r<\/td>\n\r<\/tr>\n\r<tr>\n\r<td style=\"vertical-align:top; width:20.3750rem; padding:0; border:none\"><p class=\"p_ControlIndent\" style=\"margin: 0.5000rem 0 0.1875rem 0.6250rem;\"><span class=\"f_ControlIndent\">ReplyTo &lt;mailbox@example.com&gt;<\/span><\/p>\n\r<\/td>\n\r<td style=\"vertical-align:top; width:17.6250rem; padding:0; border:none\"><p class=\"p_ControlIndent\" style=\"margin: 0.5000rem 0 0.1875rem 0;\"><span class=\"f_ControlIndent\">可选的电子邮件地址，邮件回复将导向该地址。<\/span><\/p>\n\r<\/td>\n\r<\/tr>\n\r<tr>\n\r<td style=\"vertical-align:top; width:20.3750rem; padding:0; border:none\"><p class=\"p_ControlIndent\" style=\"margin: 0.5000rem 0 0.1875rem 0.6250rem;\"><span class=\"f_ControlIndent\">CC &lt;maibox@example.com[, mailbox@example.com]&gt;<\/span><\/p>\n\r<\/td>\n\r<td style=\"vertical-align:top; width:17.6250rem; padding:0; border:none\"><p class=\"p_ControlIndent\" style=\"margin: 0.5000rem 0 0.1875rem 0;\"><span class=\"f_ControlIndent\">可选的邮件抄送人列表。可指定多个抄送人，互相之间用逗号隔开。<\/span><\/p>\n\r<\/td>\n\r<\/tr>\n\r<tr>\n\r<td style=\"vertical-align:top; width:20.3750rem; padding:0; border:none\"><p class=\"p_ControlIndent\" style=\"margin: 0.5000rem 0 0.1875rem 0.6250rem;\"><span class=\"f_ControlIndent\">Subject &lt;text&gt;<\/span><\/p>\n\r<\/td>\n\r<td style=\"vertical-align:top; width:17.6250rem; padding:0; border:none\"><p class=\"p_ControlIndent\" style=\"margin: 0.5000rem 0 0.1875rem 0;\"><span class=\"f_ControlIndent\">邮件的可选主题。<\/span><\/p>\n\r<\/td>\n\r<\/tr>\n\r<tr>\n\r<td style=\"vertical-align:top; width:20.3750rem; padding:0; border:none\"><p class=\"p_ControlIndent\" style=\"margin: 0.5000rem 0 0.1875rem 0.6250rem;\"><span class=\"f_ControlIndent\">Header &lt;Header: Value&gt;<\/span><\/p>\n\r<\/td>\n\r<td style=\"vertical-align:top; width:17.6250rem; padding:0; border:none\"><p class=\"p_ControlIndent\" style=\"margin: 0.5000rem 0 0.1875rem 0;\"><span class=\"f_ControlIndent\">允许您直接将报头:\/值组合放入邮件。<\/span><span style=\"font-size: 0.90rem; font-family: \'Times New Roman\',Times,Georgia,serif; color: #010100;\"> <\/span><span class=\"f_ControlIndent\">这使您得以在 *.raw 邮件中插入定制或非标准报头。<\/span><\/p>\n\r<\/td>\n\r<\/tr>\n\r<\/table>\n\r<\/div>\n\r<h2 class=\"p_Heading2\" style=\"page-break-after: avoid;\"><a id=\"special-fields-supported-by-raw\" class=\"hmanchor\"><\/a><span class=\"f_Heading2\">RAW 支持的特殊字段<\/span><\/h2>\n\r<p class=\"p_ControlHeading\" style=\"page-break-after: avoid;\"><span class=\"f_ControlHeading\">附件和编码<\/span><\/p>\n\r<p class=\"p_ControlIndent2\" style=\"margin: 0.3750rem 0.3125rem 0.8750rem 3.6250rem;\"><span style=\"font-size: 1.10rem; font-family: \'Courier New\',Courier,monospace; color: #010100;\">x-flag=attach &lt;filepath, method&gt; [-x]<\/span><\/p>\n\r<p class=\"p_ControlIndent2\"><span class=\"f_ControlIndent\">例如： <\/span><span style=\"font-size: 1.10rem; font-family: \'Courier New\',Courier,monospace; color: #010100;\">x-flag=attach &lt;c:\\utils\\pkzip.exe, MIME&gt; -x<\/span><\/p>\n\r<p class=\"p_ControlIndent2\"><span class=\"f_ControlIndent2\">该 X-FLAG 选项指定了值“ATTACH”及 ＜＞ 符号中的两个参数。第一个参数是邮件附件的完整文件路径。第二个参数与第一个参数用逗号隔开，它指定了插入附件时要使用的编码方式。MDaemon 支持该参数有两种取值。MIME 方式指示服务器使用互联网标准的 Base64 邮件编码方式。ASCII 方式指示服务器简单地把文件导入到邮件中。字符串末尾的可选 -X 参数指示服务器一旦附加了文件后即将其从磁盘上删去。<\/span><\/p>\n\r<p class=\"p_ControlHeading\" style=\"page-break-after: avoid;\"><span class=\"f_ControlHeading\">投递状态通知<\/span><\/p>\n\r<p class=\"p_ControlIndent2\" style=\"margin: 0.3750rem 0.3125rem 0.8750rem 3.6250rem;\"><span style=\"font-size: 1.10rem; font-family: \'Courier New\',Courier,monospace; color: #010100;\">x-flag=confirm_delivery<\/span><\/p>\n\r<p class=\"p_ControlIndent2\"><span class=\"f_ControlIndent2\">当把包含该标志的 RAW 邮件转换成 RFC-2822 邮件时，该字符串将转化为“Return-Receipt-To： &lt;sender@example.com&gt;”结构。<\/span><\/p>\n\r<p class=\"p_ControlHeading\" style=\"page-break-after: avoid;\"><span class=\"f_ControlHeading\">将特定的报头\/值组合插入 RFC-2822 邮件<\/span><\/p>\n\r<p class=\"p_ControlIndent2\" style=\"margin: 0.3750rem 0.3125rem 0.8750rem 3.6250rem;\"><span style=\"font-size: 1.10rem; font-family: \'Courier New\',Courier,monospace; color: #010100;\">header &lt;header: value&gt;<\/span><\/p>\n\r<p class=\"p_ControlIndent2\"><span class=\"f_ControlIndent2\">如果希望把特定的报头\/值组合插入从 RAW 文件生成的 RFC-2822 邮件，则需要使用上述 RAW 报头部分中所列的 HEADER 宏。例如，如果希望将报头“Delivered-By: mail-machine@example.com”插入 RFC-2822 邮件，则应在 RAW 邮件中插入： “header &lt;Delivered-By: mail-machine@example.com&gt;”。请注意：“header”宏需要字段和值。您可按需在 RAW 邮件中插入多个“header”宏。<\/span><\/p>\n\r<p class=\"p_ControlHeading\" style=\"page-break-after: avoid;\"><span class=\"f_ControlHeading\">DKIM 签名 RAW 邮件<\/span><\/p>\n\r<p class=\"p_ControlIndent2\" style=\"margin: 0.3750rem 0.3125rem 0.8750rem 3.6250rem;\"><span style=\"font-size: 1.10rem; font-family: \'Courier New\',Courier,monospace; color: #010100;\">x-flag=sign<\/span><\/p>\n\r<p class=\"p_ControlIndent2\"><span style=\"font-size: 1.10rem; font-family: \'Courier New\',Courier,monospace; color: #010100;\">*.raw<\/span><span class=\"f_ControlIndent2\"> 文件中包含此特殊命令将使 RAW 邮件接受 DKIM 签名。只应在配置为绕过内容过滤器（通过以“<\/span><span style=\"font-size: 1.10rem; font-family: \'Courier New\',Courier,monospace; color: #010100;\">p<\/span><span class=\"f_ControlIndent2\">”或“<\/span><span style=\"font-size: 1.10rem; font-family: \'Courier New\',Courier,monospace; color: #010100;\">P<\/span><span class=\"f_ControlIndent2\">”作为文件名开头来实现）的 RAW 邮件中使用该命令。不应在经由过滤器处理的普通 RAW 邮件中使用该命令。这些邮件将被照常签名。<\/span><\/p>\n\r<div style=\"text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 3.0625rem 0.8750rem 3.0000rem;\"><table style=\"background-color:#ffffe6; border:solid thin #000000; border-spacing:0;\">\n\r<tr>\n\r<td style=\"vertical-align:top; width:3.1250rem; height:3.1250rem; padding:0.3125rem; border:none\"><p class=\"p_NoFormat\"><img style=\"margin:0;width:3.1250rem;height:3.1250rem;border:none\" src=\".\/images\/lightbulb_on_50_yback.gif\"\/><\/p>\n\r<\/td>\n\r<td style=\"vertical-align:top; padding:0.3125rem; border:none\"><p class=\"p_Notes\"><span class=\"f_Notes\">由内容过滤器生成的所有 RAW 邮件将自动使用 <\/span><span style=\"font-size: 1.10rem; font-family: \'Courier New\',Courier,monospace;\">x-flag=sign<\/span><span class=\"f_Notes\"> 命令。<\/span><\/p>\n\r<\/td>\n\r<\/tr>\n\r<\/table>\n\r<\/div>\n\r<h2 class=\"p_Heading2\" style=\"page-break-after: avoid;\"><a id=\"sample-raw-mail-messages\" class=\"hmanchor\"><\/a><span class=\"f_Heading2\">RAW 邮件示例<\/span><\/h2>\n\r<p class=\"p_ControlHeading\" style=\"page-break-after: avoid; margin: 0.3125rem 0.3125rem 0.3750rem 2.1250rem;\"><span class=\"f_ControlHeading\">示例 1：<\/span><\/p>\n\r<p class=\"p_Code2\"><span class=\"f_Code2\">from &lt;mdaemon@altn.com&gt;<\/span><\/p>\n\r<p class=\"p_Code2\"><span class=\"f_Code2\">to &lt;user01@example.com&gt;<\/span><\/p>\n\r<p class=\"p_Code2\"><span class=\"f_Code2\">&nbsp;<\/span><\/p>\n\r<p class=\"p_Code2_LastItem\"><span class=\"f_Code2_LastItem\">你好，John！<\/span><\/p>\n\r<p class=\"p_ControlHeading\" style=\"page-break-after: avoid; margin: 0.3125rem 0.3125rem 0.3750rem 2.1250rem;\"><span class=\"f_ControlHeading\">示例 2：<\/span><\/p>\n\r<p class=\"p_Code2\"><span class=\"f_Code2\">from &lt;user01@example.com&gt;<\/span><\/p>\n\r<p class=\"p_Code2\"><span class=\"f_Code2\">to &lt;user09@example.net&gt;<\/span><\/p>\n\r<p class=\"p_Code2\"><span class=\"f_Code2\">主题 &lt;Requested Files&gt;<\/span><\/p>\n\r<p class=\"p_Code2\"><span class=\"f_Code2\">X-FLAG=CONFIRM_DELIVERY<\/span><\/p>\n\r<p class=\"p_Code2_LastItem\"><span class=\"f_Code2_LastItem\">X-FLAG=ATTACH &lt;c:\\docs\\files\\data01.zip, MIME&gt; -X<\/span><\/p>\n\r<p class=\"p_Code2_LastItem\"><span class=\"f_Code2_LastItem\">这些是您需要的所有文件。<\/span><\/p>\n\r<p class=\"p_ControlIndent\"><span class=\"f_ControlIndent\">&nbsp;<\/span><\/p>\n\r"
})
