idnits 2.17.1 draft-dmarc-vesely-mlm-transform-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** There are 27 instances of too long lines in the document, the longest one being 7 characters in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (November 2020) is 1252 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- == Outdated reference: A later version (-30) exists of draft-ietf-dmarc-dmarcbis-00 -- Obsolete informational reference (is this intentional?): RFC 7601 (Obsoleted by RFC 8601) Summary: 1 error (**), 0 flaws (~~), 2 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group A. Vesely 3 Internet-Draft November 2020 4 Intended status: Informational 5 Expires: 20 May 2021 7 Mailing List Manager (MLM) Transformations 8 draft-dmarc-vesely-mlm-transform-00 10 Abstract 12 The widespread adoption of Domain-based Message Authentication, 13 Reporting, and Conformance (DMARC) led Mailing List Managers (MLM) to 14 rewrite the From: header field as a workaround. 16 This document describes cases where it is possible to revert MLM 17 transformations and hence verify DomainKeys Identified Mail (DKIM) 18 signatures that were applied at submission time. For reliable 19 results, some compliance is required of all agents involved, author 20 domain signers, MLMs, forwarders, and final recipients. 22 MLM transformation reversion reduces the DMARC's effects on indirect 23 mail flows. 25 Status of This Memo 27 This Internet-Draft is submitted in full conformance with the 28 provisions of BCP 78 and BCP 79. 30 Internet-Drafts are working documents of the Internet Engineering 31 Task Force (IETF). Note that other groups may also distribute 32 working documents as Internet-Drafts. The list of current Internet- 33 Drafts is at https://datatracker.ietf.org/drafts/current/. 35 Internet-Drafts are draft documents valid for a maximum of six months 36 and may be updated, replaced, or obsoleted by other documents at any 37 time. It is inappropriate to use Internet-Drafts as reference 38 material or to cite them other than as "work in progress." 40 This Internet-Draft will expire on 5 May 2021. 42 Copyright Notice 44 Copyright (c) 2020 IETF Trust and the persons identified as the 45 document authors. All rights reserved. 47 This document is subject to BCP 78 and the IETF Trust's Legal 48 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 49 license-info) in effect on the date of publication of this document. 50 Please review these documents carefully, as they describe your rights 51 and restrictions with respect to this document. 53 Table of Contents 55 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 56 2. Terms Definitions . . . . . . . . . . . . . . . . . . . . . . 3 57 3. Revertible Transformations . . . . . . . . . . . . . . . . . 3 58 3.1. Header Transformations . . . . . . . . . . . . . . . . . 3 59 3.2. Body Transformations . . . . . . . . . . . . . . . . . . 4 60 4. Outline of a Reverting Verifier . . . . . . . . . . . . . . . 4 61 5. Actors Roles and Compliance . . . . . . . . . . . . . . . . . 6 62 5.1. Original Signer . . . . . . . . . . . . . . . . . . . . . 6 63 5.2. MLM . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 64 5.3. Verifier . . . . . . . . . . . . . . . . . . . . . . . . 8 65 6. Security Considerations . . . . . . . . . . . . . . . . . . . 8 66 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 67 7.1. Permanent Message Header Field Names . . . . . . . . . . 9 68 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 69 8.1. Normative References . . . . . . . . . . . . . . . . . . 9 70 8.2. Informative References . . . . . . . . . . . . . . . . . 10 71 Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 11 72 A.1. Single-part plain text . . . . . . . . . . . . . . . . . 11 73 A.2. Multipart added . . . . . . . . . . . . . . . . . . . . . 12 74 A.3. Multipart wrapped . . . . . . . . . . . . . . . . . . . . 14 75 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 15 77 1. Introduction 79 Mailing List Managers (MLMs) can be configured to add a footer and a 80 subject tag to the messages that they redistribute. Although that 81 behavior slightly exceeds the very limited set of modifications and 82 actions described by Section 3.9.2 of [RFC5321], it is a welcome, 83 time-honored tradition. According to their configuration, the 84 modifications they carry out on messages may result in a set of 85 stylized transformations that are programmatically revertible. 86 Reversion allows to verify DomainKeys Identified Mail (DKIM) 87 signatures ([RFC6376]) that were applied before the transformation. 89 Domain-based Message Authentication, Reporting, and Conformance 90 (DMARC) ([I-D.ietf-dmarc-dmarcbis]) hinges on the alignment of the 91 domain in the From: header field with a verified DKIM signature. For 92 that reason, MLMs that transform messages have to rewrite From:. A 93 deed which can be mitigated in some cases. 95 Mailbox providers can configure their mail submission agents (MSAs) 96 in order to ease MLM transformation reversion. Or they can make it 97 impossible. It is their policy and their will. MLM operators make a 98 similar decision. When they both agree on revertibility, a well 99 equipped receiver can verify the original signatures. The outcome is 100 twofold: 102 1. Author domains receive positive feedback about DKIM verification 103 of mailing list traffic. That might eventually lead them to 104 harden their DMARC policy. 106 2. Final recipient's mail delivery agents (MDAs), which know by the 107 Authentication-Results: field whether a rewritten From: header 108 was verified, can safely undo From: munging (after any external 109 forwarding). 111 2. Terms Definitions 113 *Signers* and *verifiers* are defined in [RFC6376]. The use of the 114 term *Mailing List Manager*, almost always abbreviated *MLM* follows 115 [RFC6377]. A MLM is a kind of *Mediator* in [RFC5598] parlance. 117 *Message* is defined in [RFC5322]. It consists of a *header* made up 118 of one or more *fields* and a *body*, possibly composed of various 119 MIME *entities*, the latter being defined in [RFC2045] and 120 companions. 122 The term *original* is used here to refer to the Author or parts of 123 the Author's message as it was sent out by the Author's domain, where 124 *Author* is defined in [RFC5598]. 126 3. Revertible Transformations 128 Message modifications can affect the header and/or the body of a 129 message. This document only considers the very limited set of 130 transformation described in the following subsections. They turn out 131 to be revertible. 133 3.1. Header Transformations 135 MLM often modify the Subject: field by inserting a tag at the 136 beginning of its value. A tag consists of a short text delimited by 137 square brackets. For example:: 139 Subject: [added tag] Original value of subject 141 This transformation is easily reverted by removing the tag. For 142 security reasons, subject tags must not exceed 20 characters. 144 A more recent modification carried out by MLMs is From: rewriting. 145 It alters the value of From: in order to pass DMARC filters. MLMs 146 save the original value of From: in a variety of places, including 147 Reply-To:, Cc:, X-Original-From:. When the original value is known, 148 the transformation is revertible. 150 3.2. Body Transformations 152 Footer addition is often performed in one of three ways, according to 153 the format of the original message. 155 Single-part plain text 156 When the original message is not structured, a footer can be 157 appended at the end of the original text. See example in 158 Appendix A.1 160 Multipart added 161 The footer stands in its own MIME entity, which is appended as the 162 last part of an original multipart/mixed structure. See example 163 in Appendix A.2 165 Multipart wrapped 166 The footer stands in the second entity of a new multipart/mixed 167 MIME structure whose first entity consists of the original body. 168 See example in Appendix A.3 170 The footer begins with a line consisting exclusively of underscore 171 ("_", ASCII 95) characters, at least four of them. For security 172 reasons, the footer must belong to an entity of Content-Type: text/ 173 plain in all cases. In addition, footers cannot exceed 10 lines of 174 text, each shorter than 80 characters. 176 4. Outline of a Reverting Verifier 178 The algorithm described here is implemented in a mail filter. It 179 usually reads the input message twice -first pass, verify; last pass, 180 write Authentication-Results and the rest of the message to follow. 181 When enabling MLM transformation reversion, there can be a retry pass 182 in between those two. The result is yielded during the SMTP dialogue 183 with no noticeable delay. Implementing reversion changed the 184 software from 22730 lines of C code to 26762. The bulk of such ~18% 185 increase is due to the addition of encoding conversion functions. 186 Changes involve both verifying and signing functions (see Section 5.1 187 for the latter). 189 While reading the header in the first pass, the verifier looks for 190 specific fields: 192 * From: 194 * Original-From: 196 * X-Original-From: 198 * Reply-To: 200 * Cc: 202 These are candidates to the original mailbox. 204 The verifier also collects the Subject: and any field named 205 Original-* that the original signer might have set to ease the 206 reversion. At the end of the header, candidate original mailboxes 207 are sorted according to the display name, which MLMs try and keep 208 unaltered. The best candidate is then added to the collected set of 209 Original-* fields. If the Subject: begins with a tag, its version 210 without tag is added to that set as well, unless one is there 211 already. 213 Next, before reading the body, the verifier looks for prospect 214 signatures; that is, signatures whose "d=" domain is not aligned with 215 SPF credentials ([RFC7208]), List-Post: ([RFC4201]), Sender:, or the 216 rewritten From: (if deemed to have been rewritten). If any such 217 signature exist, along with MLM or other signatures, then the 218 verifier enables parsing the body to look for a footer. 220 Body parsing is done in parallel with body canonicalization during 221 the first pass. For multipart, track top level entities. Set 222 transformation type to "wrapped" if there are exactly two entities, 223 "added" otherwise. For single-part, body parsing must avail of 224 encoding conversions as needed. Assume identity encoding, 7bit or 225 8bit, unless otherwise directed by an Original-Content-Transfer- 226 Encoding: field. 228 At the end of the first pass, the verifier knows how prospect 229 signatures did. Let's recall that DKIM signature verification 230 results from two independent operations, steps 3 and 4 in 231 Section 6.1.3 of [RFC6376]. The signature in the "b=" tag depends on 232 the header, while the body hash in the "bh=" tag depends on the body: 234 * If the signature "b=" did not verify and the set of Original-* 235 fields is not empty, then it is worth to try and re-canonicalize 236 the header using the values in the set of Original-* fields. 238 * If the body hash "bh=" did not match and a footer was found, then 239 it is worth to try and re-canonicalize the body excluding the 240 footer. 242 None, one, or both of the above operations are performed in the retry 243 pass. 245 On writing Authentication-Results, if a prospect signature verifies 246 after replacing the From: field, the verifier writes a prominent, 247 well documented "reason" in the relevant resinfo stanza (Section 2.2 248 of [RFC7601]). That way, reversion elements can be easily recognized 249 and parsed by downstream agents. 251 5. Actors Roles and Compliance 253 5.1. Original Signer 255 Signers who wish their users to be able to participate to mailing 256 lists can adopt rules apt to ease MLM transformations reversion. 257 Doing so can slightly weaken DKIM'S stiffness, and expose to the risk 258 of malicious MLMs. A sender that doesn't know which of its mail 259 recipients are likely to be MLMs might abide by the following rules 260 for all outgoing mail, in the expectation that few of its users 261 correspondents are likely to be malicious. A sender that had some 262 idea which recipients are MLMs could apply the rules only to mail to 263 those recipients. Or a sender might apply the rules to all mail 264 except that sent to recipients with poor reputations. 266 A special rule is the addition of an Original-From: header field with 267 a value identical to the one signed in From:. Original-From: is 268 defined by [RFC5703] in the context of Sieve Email Filtering. As 269 Sieve operates at time of final delivery, DKIM verifiers which act at 270 the time of message transit can reliably use it. 272 Original-From: is special because verifiers may infer that the field 273 was added by the original signer rather than by MLMs. In that case, 274 they can send DMARC feedback reports to the original signer even if 275 From: was rewritten. 277 Other generic rules to ease reversion are as follows: 279 * DKIM signatures must deploy the "relaxed" canonicalization, at 280 least for the header, since MLMs may reflow header fields. 282 * The quoted-printable encoding must not be used for the body of 283 single-part text/plain messages, as it is impossible to guess 284 original soft line breaks after re-encoding. Base64 is much more 285 robust. 287 * Single-part text/plain messages encoded as base64 must follow a 288 constant column width of 76 characters. The encoding must be 289 advertised by adding a new header field as follows: 291 Original-Content-Transfer-Encoding: base64 293 * If the original Subject: begins with a tag, its value must be 294 copied to an Original-Subject: header field. The latter field is 295 also defined by [RFC5703], and the same usage considerations hold. 297 * Content-Type: and Content-Transfer-Encoding: are fields related to 298 the data form. Mailers often rewrite them, so they should not be 299 signed. If signed, their Original- counterpart should be set too. 301 * When signing Cc: or Reply-To:, add their Original- counterparts to 302 the header, as MLMs are likely to change them. 304 * Original-*: fields with an empty value stand for non-existing 305 counterparts. 307 * Original-* fields need not be signed. If original signatures can 308 be recovered, that suffices; otherwise, the unverified signature 309 is irrelevant. 311 5.2. MLM 313 Participating MLMs must not operate transformations other than those 314 listed in Section 3. Since DKIM is MIME-agnostic, attention must be 315 paid to preserve the exact preamble and epilogue of the original MIME 316 structure. 318 MLMs must apply their own DKIM signature. The presence of signatures 319 by multiple domains can be used by verifiers to infer that a message 320 underwent MLM transformations. 322 MLMs must not set the Original-From: field, which is reserved to 323 original signers. It is recommended that MLMs add a mailbox entry to 324 Reply-To: or Cc: in order to ease off-list replies as well as to 325 allow transformation reversion, but only in case the Original-From: 326 is missing. 328 MLMs may set Original-* fields other than Original-From:, but only if 329 the original message contains no Original-* field at all. That is, 330 when the author's domain is not aware of the possibility to ease MLM 331 transformation reversion. 333 MLMs which collect posts from other MLMs must avoid to add their own 334 footer and subject tag. Transformation reversion cannot be stacked. 335 A second-level MLM can modify or replace the content of previous 336 transformations. Attention must be paid to not exceed tag and footer 337 length limits. 339 5.3. Verifier 341 Attempts to verify original signatures can be done as outlined in 342 Section 4. The reversion must not replace the messages signed and 343 distributed by MLMs, with one exception detailed in the next 344 paragraph. Only the result of the verification is written out. 346 If an original signature with rewritten From: is recovered, the 347 verifier must make sure that an Original-From: field with the 348 verified mailbox is written out. An MDA downstream may combine the 349 Authentication-Results: and Original-From: fields to restore the 350 original value of From:. This is the only recommended modification 351 to the distributed message. It must be done after any dot-forward 352 processing, so that external verifiers receive the message as 353 distributed by the MLM, and can revert transformations by themselves. 355 If the Original-From: is set, the corresponding DMARC record may be 356 looked up and its "rua=" and "ruf=" tags considered for feedback 357 reports. If DMARC policies are considered, it is the the From: field 358 which rules, not the Original-From: nor any other mailbox value, 359 unless verified. 361 6. Security Considerations 363 Rewriting the From: header field is an unwelcome modification to 364 messages. It fosters the belief that the display name of a mailbox 365 is more trustworthy than the angle address. A belief further 366 consented by the tendency to not even display the latter. Bad actors 367 take advantage of this belief by displaying the names of trusted 368 institution paired with trash email addresses hidden between angle 369 brackets. That trick defeats DMARC's purpose. 371 It is out of this document's scope to suggest how mail user agents 372 (MUAs) could counter phishing by highlighting security indicators 373 (for the extent that indicators can actually help preventing phishing 374 attacks). Let's just note that MUAs have to cope with MLM and 375 phishing alike, which makes it hard to devise a pattern to tell apart 376 one from the other without getting involved with the reputation of 377 the specific domains. 379 By safely restoring munged From: to the original value, that contrast 380 is eliminated. Then, perhaps, deceptive mailboxes might become 381 amenable to some kind of efficient indication. 383 Of course, MLM role can be played by miscreants as well. However, 384 replaying a signed message, even with revertible transformations, has 385 more limits than forging scam messages anew. Therefore, the risk 386 introduced by easing transformation reversion is considerably lower 387 than that of not signing, or of keeping DMARC policy at "none". 389 Compared with the use of "l=" tag (Section 8.2 of [RFC6376]), the 390 fact that footers are written in plain text removes the main security 391 objection about footer additions. Namely, footers cannot completely 392 replace the original content in the end recipient's eyes by 393 exploiting lax HTML parsing in the MUA. 395 Still, a footer can contain dangerous URLs and deceiving text. That 396 possibility has to be countered by usual mail filtering and savvy 397 behavior. 399 7. IANA Considerations 401 IANA maintains the "Message Header" registry with several 402 subregistries. IANA is asked to make the assignments set out in the 403 following section. 405 7.1. Permanent Message Header Field Names 407 IANA is asked to create new entries in the "Permanent Message Header 408 Field Names" registry as follows. 410 +===================+==========+==========+==========+===========+ 411 | Header Field Name | Template | Protocol | Status | Reference | 412 +===================+==========+==========+==========+===========+ 413 | Original-Content- | | mail | standard | this I-D | 414 | Transfer-Encoding | | | | | 415 +-------------------+----------+----------+----------+-----------+ 416 | Original-Reply-To | | mail | standard | this I-D | 417 +-------------------+----------+----------+----------+-----------+ 418 | Original-Cc | | mail | standard | this I-D | 419 +-------------------+----------+----------+----------+-----------+ 421 Table 1 423 8. References 425 8.1. Normative References 427 [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 428 Extensions (MIME) Part One: Format of Internet Message 429 Bodies", RFC 2045, DOI 10.17487/RFC2045, November 1996, 430 . 432 [RFC5321] Klensin, J., "Simple Mail Transfer Protocol", RFC 5321, 433 DOI 10.17487/RFC5321, October 2008, 434 . 436 [RFC5322] Resnick, P., Ed., "Internet Message Format", RFC 5322, 437 DOI 10.17487/RFC5322, October 2008, 438 . 440 [RFC6376] Crocker, D., Ed., Hansen, T., Ed., and M. Kucherawy, Ed., 441 "DomainKeys Identified Mail (DKIM) Signatures", STD 76, 442 RFC 6376, DOI 10.17487/RFC6376, September 2011, 443 . 445 [I-D.ietf-dmarc-dmarcbis] 446 Gustafsson, E., Herr, T., and J. Levine, "Domain-based 447 Message Authentication, Reporting, and Conformance 448 (DMARC)", Work in Progress, Internet-Draft, draft-ietf- 449 dmarc-dmarcbis-00, 11 November 2020, 450 . 453 8.2. Informative References 455 [RFC4201] Kompella, K., Rekhter, Y., and L. Berger, "Link Bundling 456 in MPLS Traffic Engineering (TE)", RFC 4201, 457 DOI 10.17487/RFC4201, October 2005, 458 . 460 [RFC5703] Hansen, T. and C. Daboo, "Sieve Email Filtering: MIME Part 461 Tests, Iteration, Extraction, Replacement, and Enclosure", 462 RFC 5703, DOI 10.17487/RFC5703, October 2009, 463 . 465 [RFC5598] Crocker, D., "Internet Mail Architecture", RFC 5598, 466 DOI 10.17487/RFC5598, July 2009, 467 . 469 [RFC6377] Kucherawy, M., "DomainKeys Identified Mail (DKIM) and 470 Mailing Lists", BCP 167, RFC 6377, DOI 10.17487/RFC6377, 471 September 2011, . 473 [RFC7208] Kitterman, S., "Sender Policy Framework (SPF) for 474 Authorizing Use of Domains in Email, Version 1", RFC 7208, 475 DOI 10.17487/RFC7208, April 2014, 476 . 478 [RFC7601] Kucherawy, M., "Message Header Field for Indicating 479 Message Authentication Status", RFC 7601, 480 DOI 10.17487/RFC7601, August 2015, 481 . 483 Appendix A. Examples 485 In the examples that follow, the first character of each wrapped line 486 of DKIM-Signature: fields should be a TAB. For editorial reasons, it 487 is rendered as four spaces. While visually there is little 488 difference, those signatures won't verify unless replacing them with 489 a TAB. 491 To verify the examples, public keys can be set as follows: 493 s._domainkey.example.com IN TXT ( "v=DKIM1; g=*; k=rsa; " 494 "p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqlye7m5zLLXoIpBp2OO05LNMqK" 495 "u0zKowoHOpyRpviOVqOaNCk5uZ+wY00JwrKbt5u1G1ghuXsFkFkl0h00LBurz7ivyZH" 496 "3LohSWOZ8okgR+8kuGu9GHtQ+MqgRd16tlCF8PlWS2kGaBQKua1zk+ZCDwFy82Uo5G2" 497 "1nu/+Nn2sUwIDAQAB" ) 499 s._domainkey.lists.example IN TXT ( "v=DKIM1; k=rsa; " 500 "p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDgnLb2TZ6KECBMBo9ZLqDFt4ZBz" 501 "NHFrgBj/LVJVFU8IQP8uH4G8Pj0mEHRo1qpf0vuFI2HVpe/3NhzkT4Ay/1ZIIsxY754" 502 "f2thlhBvKh4AAgZFmzRvA3aZs6Tb/ERmD+a51liEMFaTOmY4mWeLi9wOM51usQ9Q65i" 503 "8IP/vjHM3rQIDAQAB" ) 505 A.1. Single-part plain text 507 Base64 encoding has to be decoded in order to locate the footer. The 508 original encoding was text/plain, this can be inferred by the 509 verifier from the absence of an Original-Content-Transfer-Encoding: 510 field. The original body hash will match after decoding and removing 511 the footer. Note that an "l=" tag couldn't have done the trick in 512 this case. 514 Received: from lists.example by subscriber.example.org with ESMTP 515 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=lists.example; s=s; 516 t=1603901305; bh=MjC5ikx26j8beyDJiz7Rk/4W+ppdGOmqh6koz0gLa8o=; 517 h=Date:From:To:Subject; 518 b=PNIYHGd7aytHEvew44WRpSfl4Py3c/9mKjovvQ1ps/xdpkl1/z+gWeu8e8ZmR7gdE 519 iT2TsJ7ni3Lfp5oUpGCko5MvCoqcKX7Zmq3CmXTxRTwwvVZrAp/ir8UTvG+rJFnyEZ 520 Yi3dSTX4rKe2LotyLkqcs+/uXaWEADbqcBp/9iHo= 521 Received: from mail.example.com by lists.example with ESMTP 522 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=example.com; s=s; 523 t=1603889142; bh=hrDXocZNPy1+eUFYIk1PVRKa6mUMb8+ql9CFNABacww=; 524 h=Date:From:To:Subject; 525 b=YFLwvvW5bGbE5HpJwBM1JoL1F9b8AxdVFlwE/vOkL0p/pPpr7g9KnPXqwoEXZgFI0 526 /kkTHK/Afy4gaWZQfwDZ77LuxYSMFjwpNorSc0YEGzHYzLCN7rL1e+xE7B7kOCThiq 527 ebaMdcaHeZF6QUmWcUkEj8LVkxrvWi+bTzd3RnaA= 528 Original-From: Author 529 Received: from mua.example.com by mail.example.com with ESMTPA 530 Message-ID: <123456@author.example> 531 Date: Mon, 28 Oct 2020 13:12:55 +0100 532 From: Author 533 MIME-Version: 1.0 534 To: MLM@lists.example 535 Subject: [example] Check simple MLM message 536 Content-Type: text/plain; charset=us-ascii 537 Content-Transfer-Encoding: base64 539 VGhpcyBpcyBhIHBsYWluIHRleHQgbWVzc2FnZSBzdWJtaXR0ZWQgdG8gYSBtYWlsaW5nIGxpc3Qu 540 ClRoZSBtYWlsaW5nIGxpc3QgaXMgZXhwZWN0ZWQgdG8gYWRkIGEgZm9vdGVyIGFuZCBhIHN1Ympl 541 Y3QgdGFnLgoKQmVzdApBdXRob3IKCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f 542 X19fX18KdGhpcyBtZXNzYWdlIHdhcyBtb2RpZmllZCBieSBNTE0gZXhhbXBsZQphZGRpbmcgdGhp 543 cyBmb290ZXIgYW5kIHRoZSBzdWJqZWN0IHRhZwoobm90ZSB0aGF0IGw9IGlzIG5vdCBzZXQpCg== 545 A.2. Multipart added 547 When the original message has a MIME structure, MLMs can append an 548 entity. 550 Received: from lists.example by subscriber.example.org with ESMTP 551 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=lists.example; s=s; 552 t=1603974193; bh=sEPYSlJlh90leqy5+63oPn1iU+9P684R92cZHXa9ENw=; 553 h=Date:From:To:Subject; 554 b=fTSAMcaEatofQCuAeUhlTXmVl5j9bPbwWgc84NWtoSt5zT+SSNp37DTzhYIGHozEk 555 bpldArGQ+GygJE1b2witi6NctBd1O/xsUwDcJQxDXkF63QlCcalbKWypHZOhRqncUQ 556 zgUzdcuYgqTYMJ0NoTP8fqu0HdgmjD2LJXjV3pVI= 557 Old-Authentication-Results: lists.example; 558 dkim=pass header.d=example.com 559 Received: from mail.example.com by lists.example with ESMTP 560 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=example.com; s=s; 561 t=1603973996; bh=eWqyE53pjRVCFGyHY1zGQTkCEvucN1vNN4cTcWk90WU=; 562 h=Date:From:To:Subject; 563 b=LGP1M3IX6XORfLs8HRLCFOcymzsPn+8+ljgQlmeNlCC/2Cl1+aBDCIEnzWI0pceCb 564 zg32vFfEeryvRDHB1L1K4rrKCEznvO0J3p1xkUPEWpSpzxUGw+PK9KA9ePZ5qdz7cI 565 /hXf7zjebznNdDQJnxajf7QHnx1tXmxijsJ1jiGQ= 566 Old-Authentication-Results: example.com; auth=pass (details omitted) 567 Original-From: Author 568 Received: from mua.example.com by mail.example.com with ESMTPA 569 Message-ID: <123456@author.example> 570 Date: Mon, 28 Oct 2020 13:12:55 +0100 571 From: Author via MLM 572 MIME-Version: 1.0 573 To: MLM@lists.example 574 Subject: [example] Check simple MLM message 575 Content-Type: multipart/mixed; boundary=original-boundary 577 Original preamble must be preserved! 579 --original-boundary 580 Content-Type: text/plain; charset=us-ascii 581 Content-Transfer-Encoding: 7bit 583 This is a plain text message submitted to a mailing list. 584 The mailing list is expected to add a footer and a subject tag. 586 Best 587 Author 589 --original-boundary 590 Content-Type: image/png 591 Content-Transfer-Encoding: base64 593 iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz 594 AAAHKgAAByoB49HU1wAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAB+SURB 595 VAiZNcGxDYUgAEXRhxTMYWLFVlDTOAUjOIEzWDqEC1igCQ0LSLi/+ueotUZKieu6uO+bdV2ptaLz 596 PDHGsG0b+74jieM40Pd91Fr5K6UAMC3LImutxhgaY8g5p3meNcUYFULQ+756nkchBMUYpd47OWe8 597 93jvyTnTe+cHXqRZbKSV4EoAAAAASUVORK5CYII= 599 --original-boundary 600 Content-Tyep: text/plain 602 ________________________________________ 603 this message was modified by MLM example 604 adding this footer and the subject tag 605 (note that l= cannot work in this case) 607 --original-boundary-- 609 A.3. Multipart wrapped 611 When the original body is multipart/alternative, MLMs have to wrap 612 the whole body into the first entity of a multipart/mixed structure. 613 Indeed, appending an entity to a multipart/alternative would result 614 in it either hiding or being hidden by the existing ones. 616 Received: from lists.example by subscriber.example.org with ESMTP 617 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=lists.example; s=s; 618 t=1603962061; bh=n4/RahgnfVg7htgJtCr7TwEW4eKA1O5oiNaQFA5HU+A=; 619 h=Date:From:To:Subject; 620 b=RJlq/Fu40AC1hdJfljd+KPU69Vq2M7capbGQyEMhDWvaN7xDPJdXotwnTwiz91iZY 621 5W3ITY7YXKHsWweLxu1Rph3ST3bbYQ1cifztpmtu4VPifBkm9MAe7OMDLHhk5ua9YL 622 VzJOsXieiIw5a8JhOsr6F/05/K05kNiEXvuLgKd8= 623 Old-Authentication-Results: lists.example; 624 dkim=pass header.d=example.com 625 Received: from mail.example.com by lists.example with ESMTP 626 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=example.com; s=s; 627 t=1603961679; bh=XiCPbOV1vcu2Q2TyEUOuT4SMun2AjYj/Va6KRPa1lv0=; 628 h=Date:From:To:Subject; 629 b=gvM5grV2dbtinFMLcExv+gMATILzY+c8RY7QPVBJSFohH5HMgOLwrgSH8uwOcZxq0 630 FoXtBcHnukonqo97l8nY0faHi0Dp0LAmqn9e4ijwXw9IWwhFuUiCwICRaLEzrNUVBN 631 TWtzkQKnHpEXnPGBD7Q9f924mBe+eZsDyRc41ZvQ= 632 Old-Authentication-Results: example.com; auth=pass (details omitted) 633 Original-From: Author 634 Received: from mua.example.com by mail.example.com with ESMTPA 635 Message-ID: <123456@author.example> 636 Date: Mon, 28 Oct 2020 13:12:55 +0100 637 From: Author via MLM 638 MIME-Version: 1.0 639 To: MLM@lists.example 640 Subject: [example] Check simple MLM message 641 Content-Type: multipart/mixed; boundary=MLM-boundary 643 This is the MLM preamble, not signed by Author. 645 --MLM-boundary 646 Content-Type: multipart/alternative; boundary=original-boundary 648 Original preamble must be preserved! 650 --original-boundary 651 Content-Type: text/plain; 653 This is a plain text message submitted to a mailing list. 654 The mailing list is expected to add a footer and a subject tag. 656 Best 657 Author 659 --original-boundary 660 Content-Type: text/html; 662

This is a plain text message submitted to a mailing list. 663 The mailing list is expected to add a footer and a subject tag. 665

Best
666 Author
668 --original-boundary-- 670 Original epilogue 672 --MLM-boundary 673 Content-Type: text/plain 675 ________________________________________ 676 this message was modified by MLM example 677 adding this footer and the subject tag 678 (note that l= is not set) 680 --MLM-boundary-- 682 MLM epilogue 684 Author's Address 686 Alessandro Vesely 687 v. L. Anelli 13 688 20122 Milano MI 689 Italy 691 Email: vesely@tana.it