#define DESCR_FIELD "Content-Description"
#define DISPO_FIELD "Content-Disposition"
#define MD5_FIELD "Content-MD5"
-#define ATTACH_FIELD "Attach"
+#define PSEUDOHEADER_PREFIX "Nmh-"
+#define ATTACH_FIELD PSEUDOHEADER_PREFIX "Attach"
+#define ATTACH_FIELD_ALT "Attach"
#define isatom(c) (isascii((unsigned char) c) \
&& !isspace ((unsigned char) c) \
#!/bin/sh
######################################################
#
-# Test the use of the Attach: header
+# Test the use of the Nmh-Attach: header
#
######################################################
To: Mr Test <mrtest@example.com>
cc:
Fcc: +outbox
-Attach: ${srcdir}/test/mhbuild/tiny.jpg
+Nmh-Attach: ${srcdir}/test/mhbuild/tiny.jpg
------
EOF
To: Mr Test <mrtest@example.com>
cc:
Fcc: +outbox
-Attach: ${srcdir}/test/mhbuild/tiny.jpg
-Attach: ${srcdir}/test/mhbuild/nulls
+Nmh-Attach: ${srcdir}/test/mhbuild/tiny.jpg
+Nmh-Attach: ${srcdir}/test/mhbuild/nulls
------
This is a test
EOF
To: Mr Test <mrtest@example.com>
cc:
Fcc: +outbox
-Attach:
+Nmh-Attach:
------
This is a test of an empty attach header.
EOF
#
# Two parts, one attachment; make sure mixing of multiparts at different
-# levels works
+# levels works. This also tests Attach: instead of Nmh-Attach:.
#
cat > "$draft" <<EOF
* header; in that case, add it to our attach list
*/
- if (strcasecmp(ATTACH_FIELD, np) == 0) {
+ if (strcasecmp(ATTACH_FIELD, np) == 0 ||
+ strcasecmp(ATTACH_FIELD_ALT, np) == 0) {
struct attach_list *entry;
char *s = vp, *e = vp + strlen(vp) - 1;
free(np);