
开发者发布合成邮件公开测试语料,供MIME解析器与邮件客户端使用
来源标题:A public test corpus of synthetic email
一个面向MIME解析器、邮件客户端和邮件基础设施的合成邮件公开测试语料库已发布。每条消息结构取自真实邮件,但内容、地址、链接、图片和附件全部为虚构。语料还包含预期解析结果、故意损坏的变体、离线图片副本及DKIM验证所需的DNS记录。
以下正文由 AI 翻译自 Hacker News 最新(原文版权归原站所有),可能存在偏差,重要内容请以原文为准。
We need translate article to Chinese, complete, preserve structure, no labels. Need only translation. Need handle table? Original has "Path Contents" then rows. We need preserve structure. Could use Markdown table? They ask structure照搬. Original likely table lines. We can render as table in Chinese. But no Markdown code block. Output plain translation. Need preserve paragraph structure. There are many lines/list. Need complete translation not omit. Need identify title? They said no "文章标题:" label. Should we include translated title as first line? Yes article title is part content maybe "合成电子邮件的公开测试语料库". They said don't write "文章标题:" label. Just output title line. Then body. Ensure paragraphs separated by blank lines maybe. Requirement says paragraphs between use [blank?] They wrote "用 分隔" likely newline? It appears weird. We can use blank lines.
Need be careful translating. Let's parse.
Title: A public test corpus of synthetic email = 合成电子邮件的公开测试语料库
Body first: A public test corpus of synthetic email for MIME parsers, mail clients and email infrastructure. Every message is fictional. The structure of each message (MIME tree, charsets, transfer encodings, header shapes, encoding quirks) was taken from real-world mail, and all content, names, addresses, links, images and attachments were replaced with invented ones.
Translate: 面向 MIME 解析器、邮件客户端和邮件基础设施的合成电子邮件公开测试语料库。每封邮件都是虚构的。每封邮件的结构(MIME 树、字符集、传输编码、头部形态、编码怪癖)取自真实邮件,而所有内容、姓名、地址、链接、图像和附件都替换为虚构内容。
Then table: Path | Contents messages/ | The corpus, one sc-NNNNNN.eml per message, CRLF line endings oracle/ | Expected parse per message (<id>.json) mutations/ | Deliberately broken variants, <id>.<mutation>.eml assets/ | Offline copies of every remote image the messages reference manifest/corpus.jsonl | One JSON line per message: features, quirks, language, category, thread, expected DKIM result, parser disagreements manifest/mutations.jsonl | One JSON line per mutated message and the mutation applied manifest/coverage.json | How many messages carry each structural feature manifest/dns-fixture.json | Every DNS record the signed messages need, for offline verification keys/ | Public DKIM keys, the fixture signing key, the test S/MIME CA and certificates, PGP public keys tools/ | Offline mock server, large-message generator, offline authentication check sample/ | A small sample of messages and oracles (the full set is in each release archive)
Translate table. Preserve path names. "Expected parse per message" = 每封邮件的预期解析结果. "mutated message and mutation applied" etc.
Then: The repository holds the manifests, keys, tools and a sample. Each version's full set of messages, oracles, assets and mutations is attached to its GitHub release as an archive.
Translate.
Then code block:
Every message with an encoded-word in koi8-r
grep '"ew:koi8-r/' manifest/corpus.jsonl
Every message where at least one parser disagrees with the oracle
grep -v '"parserDisagreements":{}' manifest/corpus.jsonl
Need preserve code. Comments translate? Code comments are part? We can translate comments? Usually code comments can remain English? Better translate comments to Chinese within code? They said code保留原文; comments maybe not code. But code block with comments. To be safe, keep grep commands exactly, translate comments to Chinese? Structure照搬. Could keep comments English? Since article translation, comments are explanatory text in code block. I'd translate comments: "# 每封在 koi8-r 中包含 encoded-word 的邮件" etc. That is fine.
Then: Feature tags in features describe the published bytes: generationQuirks lists properties added on purpose: broken DKIM signatures (dkim-broken-body, dkim-broken-header), S/MIME and PGP material (smime-signed, pgp-signed, pgp-encrypted, smime-enveloped), signing with the fixture key (dkim-fixture-key) and remote images that fail on purpose (remote-image-fault:<kind>). Common quirk: tags: noncanonical-qp, qp-long-lines, qp-invalid-escape, qp-lowercase-hex, noncanonical-b64, b64-bad-chars, 8bit-in-7bit, 8bit-without-charset, 8bit-header, charset-mismatch, unknown-charset, cte-unknown, format-flowed, preamble-text, epilogue-text, missing-close-boundary, implicit-content-type, no-mime-version, no-message-id, no-date, rfc2231-params, header-line-over-998, body-line-over-998, malformed-header-line, bare-cr, nul-byte.
Need translate. "Feature tags in features describe the published bytes:" maybe "features 中的特性标签描述已发布的字节内容:". generationQuirks lists properties added on purpose. "generationQuirks 列出有意添加的属性:损坏的 DKIM 签名(...), S/MIME 和 PGP 材料(...), 使用 fixture key 签名(...), 以及有意失败的远程图像(...)。" "常见怪癖标签:" list keep tags unchanged.
Then: oracle/<id>.json has expected (subject, addresses, date, message IDs, threading headers, hashes of the text and HTML bodies, attachments with size and SHA-256, and every MIME part) and parserDisagreements, which lists the fields where mailparser, postal-mime or Python's email package read the message differently. Disagreements are not necessarily bugs; they mark the messages where implementations diverge.
Translate. Careful: "has expected (subject...)" oracle/<id>.json 包含 expected(主题、地址、日期、Message ID、线程头部、文本和 HTML 正文的哈希、附件的尺寸和 SHA-256,以及每个 MIME 部分)和 parserDisagreements,后者列出 mailparser、postal-mime 或 Python 的 email 包读取该邮件时结果不同的字段。分歧不一定是 bug;它们标记的是各实现出现差异的邮件。
"message IDs" maybe Message ID. "threading headers" 线程头部.
Then: Body hashes are SHA-256 of the decoded text with CRLF turned into LF, trailing spaces and tabs removed from each line and leading or trailing blank space trimmed.
Translate.
Then: Messages refer to hosts under sc.imapkit.com: These hosts keep no logs. To test without the network, run node tools/mock-server.mjs and resolve the three hosts to 127.0.0.1.
Need note "Messages refer to hosts under sc.imapkit.com:" Maybe there were host list omitted? In original maybe no list? It ends colon then next sentence. We translate exactly. "邮件会引用 sc.imapkit.com 下的主机:" then next paragraph. Could be host names omitted due article? Keep colon. Maybe there should be list? We won't invent.
Then: Signed messages are signed by about 40 fictional brand domains under sc.imapkit.com. Their DKIM, SPF and DMARC records are live in DNS, and each domain has a null MX, so nothing can be delivered to them. ARC sets are sealed by arc.sc.imapkit.com.
Translate. "signed messages are signed by about 40 fictional brand domains under sc.imapkit.com" = 签名邮件由 sc.imapkit.com 下约 40 个虚构品牌域名签名。它们的 DKIM、SPF 和 DMARC 记录已在 DNS 中生效,每个域名都有 null MX,因此无法向它们投递任何邮件。ARC 集由 arc.sc.imapkit.com 密封。
Then: In manifest/corpus.jsonl, dkim.expected is pass or invalid. Deliberately broken signatures are invalid; verifiers differ in how they report them (fail or neutral).
Translate. "dkim.expected 为 pass 或 invalid。故意损坏的签名是 invalid;验证器在报告它们的方式上有所不同(fail 或 neutral)。"
Then: The private keys for these live domains are not published; verifying a signature only needs the public key. For signing tests, use the fixture key in keys/fixture/, which covers every .example domain in manifest/dns-fixture.json.
Translate. "这些在线域名的私钥未公布;验证签名只需要公钥。对于签名测试,请使用 keys/fixture/ 中的 fixture key,它覆盖 manifest/dns-fixture.json 中的每个 .example 域名。"
Then code: npm install mailauth node tools/verify-auth.mjs messages/sc-000123.eml
Keep.
Then: S/MIME material chains to keys/smime/ca.pem (a test CA, not trusted anywhere). PGP public keys are in keys/pgp/.
Translate. "S/MIME 材料链到 keys/smime/ca.pem(一个测试 CA,不受任何地方信任)。PGP 公钥位于 keys/pgp/。"
Then: Message size is capped near 1 MB. For performance tests, build larger variants: node tools/make-large.mjs messages/sc-000123.eml 25 > large.eml
Translate. "邮件大小上限接近 1 MB。对于性能测试,可构建更大的变体:" code.
Then heading: How the corpus was made Translate "语料库是如何制作的"
Paragraph: Messages were selected from a private mail archive to cover every distinct MIME structure, charset, encoding and quirk, three per structure group plus whole threads. A deterministic pipeline kept each message's structure and encoding style and replaced every identifier with a consistent fictional one. A language model then wrote new content for the text, in the original language. Attachments and images were generated from scratch. No original binary was copied.
Translate.
Then: Every message had to pass automated release checks before publication: Maybe list missing? It ends colon. Translate. "每封邮件在发布前都必须通过自动化发布检查:" But no list. Keep.
Then: Nothing in this corpus refers to real people or organizations. If you believe a message contains real personal data, open an issue and it will be removed in the next version.
Translate.
Then: Messages keep their IDs across versions. New versions add messages; a fixed message keeps its ID and gets a higher revision. See CHANGELOG.md.
Translate.
Then: The corpus is licensed under CC BY 4.0. Credit it as: Synthetic Email Corpus by Postal Systems OÜ, CC BY 4.0, https://github.com/postalsys/synthetic-email-corpus
Translate. "本语料库采用 CC BY 4.0 许可。署名如下:" Keep attribution line maybe translated? "Synthetic Email Corpus by Postal Systems OÜ, CC BY 4.0," Should we keep as is? It's attribution; proper names. Maybe keep exact English attribution. But title of work? "Synthetic Email Corpus" maybe keep. Since "Credit it as:" then exact citation, keep original. Good.
Then: The tools in tools/ are under the MIT license. Translate.
Need ensure complete. There may be subtle "Feature tags in features describe the published bytes:" Could be "features 中的功能标签描述已发布的字节。" Good.
Need not include labels. Could include Markdown table. They said don't wrap in code block. Fine.
Need maybe preserve headings? "How the corpus was made" as heading. No Markdown "#"? Could use "语料库是如何制作的" as line. Structure照搬. Original has "#"? It doesn't show. It's just heading. We can use "语料库是如何制作的" maybe with blank lines. They didn't prohibit Markdown. But to avoid label, just line. For table, use Markdown table. Should be okay. The user says only output translation, no Markdown code block wrap. Markdown table not code block.
Need ensure "messages/ The corpus, one sc-NNNNNN.eml per message, CRLF line endings" translate: "语料库,每封邮件一个 sc-NNNNNN.eml 文件,CRLF 行尾". Great.
Need handle "oracle/" expected parse per message (<id>.json) = "每封邮件的预期解析结果(<id>.json)". "mutations/" = "故意损坏的变体,<id>.<mutation>.eml". "assets/" = "邮件引用的每张远程图像的离线副本". "manifest/corpus.jsonl" = "每封邮件一行 JSON:特性、怪癖、语言、类别、线程、预期 DKIM 结果、解析器分歧". "manifest/mutations.jsonl" = "每个变异邮件一行 JSON,以及所应用的变异". "manifest/coverage.json" = "有多少封邮件带有每种结构特性". "manifest/dns-fixture.json" = "签名邮件所需的全部 DNS 记录,用于离线验证". "keys/" = "公开 DKIM 密钥、fixture 签名密钥、测试 S/MIME CA 和证书、PGP 公钥". "tools/" = "离线 mock 服务器、大邮件生成器、离线认证检查". "sample/" = "邮件和 oracle 的小样本(完整集在每个发布归档中)". Good.
Need preserve "encoded-word" term. Use "encoded-word". "koi8-r" lower. Fine.
Potential issue: "Feature tags in features describe the published bytes:" The word "features" is a field name. Maybe translate as "features 中的 feature tags 描述已发布的字节:" Keep "features" and "feature tags"? Could say "features 中的特性标签描述已发布的字节内容:". Good.
"generationQuirks lists properties added on purpose" keep field name. "generationQuirks" lists. Good.
"Common quirk: tags:" There is odd colon. Translate "常见怪癖标签:" Good.
"Body hashes are SHA-256 of the decoded text with CRLF turned into LF, trailing spaces and tabs removed from each line and leading or trailing blank space trimmed." Translate carefully: "正文哈希是对解码后文本计算 SHA-256:将 CRLF 转为 LF,移除每行末尾的空格和制表符,并去掉开头或结尾的空白。" Good.
"Messages refer to hosts under sc.imapkit.com:" We can translate. But maybe there are three hosts not listed. We should not invent. Keep colon. "邮件会引用 sc.imapkit.com 下的主机:" Then next paragraph starts "这些主机不保留日志。" The colon might look odd but okay.
"To test without the network, run node tools/mock-server.mjs and resolve the three hosts to 127.0.0.1." Translate "要在无网络环境下测试,请运行 node tools/mock-server.mjs,并将这三个主机解析到 127.0.0.1。" Good.
"Signed messages are signed by about 40 fictional brand domains under sc.imapkit.com." Could be "签名邮件由 sc.imapkit.com 下约 40 个虚构品牌域名进行签名。" Good.
"ARC sets are sealed by arc.sc.imapkit.com." "ARC 集由 arc.sc.imapkit.com 密封。" Maybe "ARC 集" is okay.
"verifiers differ in how they report them (fail or neutral)." "验证器报告它们的方式不同(fail 或 neutral)。" Good.
"live domains" maybe "这些在线域名" or "这些生效中的域名". "这些在线域名的私钥未公布" good.
"fixture key" keep English? They said industry terms. Maybe "fixture key" is a term. Keep. Or "fixture 密钥". Could translate "fixture 密钥" but key name. Better "fixture key". It says keys/fixture/. "use the fixture key in keys/fixture/" -> "请使用 keys/fixture/ 中的 fixture key". Good.
"which covers every .example domain in manifest/dns-fixture.json" -> "它覆盖 manifest/dns-fixture.json 中的每个 .example 域名。"
"Message size is capped near 1 MB." -> "邮件大小上限接近 1 MB。" Maybe "被限制在接近 1 MB". Good.
"How the corpus was made" -> "语料库是如何制作的". Fine.
"three per structure group plus whole threads" -> "每个结构组三封,外加完整线程". Good.
"A deterministic pipeline kept each message's structure and encoding style and replaced every identifier with a consistent fictional one." -> "一条确定性流水线保留了每封邮件的结构和编码风格,并将每个标识符替换为一致的虚构标识符。" Good.
"A language model then wrote new content for the text, in the original language." -> "随后由语言模型用原文语言为文本编写新内容。" Good.
"Attachments and images were generated from scratch. No original binary was copied." -> "附件和图像是从头生成的。没有复制任何原始二进制文件。" Good.
"Every message had to pass automated release checks before publication:" -> "每封邮件在发布前都必须通过自动化发布检查:" Good.
"Nothing in this corpus refers to real people or organizations. If you believe a message contains real personal data, open an issue and it will be removed in the next version." -> "本语料库中没有任何内容指向真实人物或组织。如果你认为某封邮件包含真实个人数据,请提交 issue,它将在下一个版本中移除。" Good.
"Messages keep their IDs across versions. New versions add messages; a fixed message keeps its ID and gets a higher revision. See CHANGELOG.md." -> "邮件在各版本之间保留其 ID。新版本会添加邮件;修复过的邮件保留其 ID,并获得更高的 revision。参见 CHANGELOG.md。" Good. "a fixed message" maybe "被修复的邮件". Yes.
"licensed under CC BY 4.0. Credit it as:" -> "本语料库采用 CC BY 4.0 许可。署名如下:" Then citation exact: Synthetic Email Corpus by Postal Systems OÜ, CC BY 4.0, https://github.com/postalsys/synthetic-email-corpus Keep. Maybe "Postal Systems OÜ" proper. Good.
"The tools in tools/ are under the MIT license." -> "tools/ 中的工具采用 MIT 许可。" Good.
Need decide whether to preserve blank lines
正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。
