entities, as required by RFC 2045.
- repl now make sure that any Fcc header in a replied-to message is not
copied into the outgoing draft by default, and that the -fcc switch
actually works in the absence of a Fcc header in the replied-to message.
+- A Content-ID is generated for message/external-body entities as required
+ by RFC 2045, even if -nocontentid is supplied to mhbuild.
* A struct multipart contains (among other things) a linked list
* of struct part elements, and THOSE contain a pointer to the sub-part's
* Content structure.
+ *
+ * An extra note for message/external-body parts. The enclosing
+ * content structure is marked as a message/external-body; the c_ctparams
+ * contains a pointer to a struct exbody, which contains a pointer to
+ * (among other things) the "real" content (e.g., application/octet-stream).
+ * The "real" content structure has the c_ctexbody pointer back to the
+ * same struct exbody sees in the enclosing content structure (the struct
+ * exbody contains parent pointers if you need to traverse up the content
+ * structure). Hopefully this makes it clearer:
+ *
+ * Enclosing content:
+ * Type: message/external-body
+ * c_ctparams: pointer to "struct exbody"
+ * c_ctexbody: NULL
+ *
+ * "Real" content:
+ * Type: application/octet-stream (or whatever)
+ * c_ctparams: NULL
+ * c_ctexbody: pointer to "struct exbody"
+ *
*/
struct Content {
/* source (read) file */
url*1="/that-should-be-wrapped/name.tar.gz"
Content-Type: application/octet-stream
+Content-ID:
Content-Description: Test of a long URL
Content-Disposition: attachment; filename="test.tar.gz"
------- =_aaaaaaaaaa0--
EOF
-check "$draft" "$expected"
+sed -e 's/^Content-ID:.*/Content-ID:/' "$draft" > "${draft}.nocontentid"
+
+check "${draft}.nocontentid" "$expected"
[ ${failed:=0} -eq 0 ] && rm -f ${backup}
add_header (ct, np, vp);
/*
- * output the Content-ID, unless disabled by -nocontentid
+ * output the Content-ID, unless disabled by -nocontentid. Note that
+ * RFC 2045 always requires a Content-ID header for message/external-body
+ * entities.
*/
- if (contentidsw && ct->c_id) {
+ if ((contentidsw || ct->c_ctexbody) && ct->c_id) {
np = mh_xstrdup(ID_FIELD);
vp = concat (" ", ct->c_id, NULL);
add_header (ct, np, vp);