From 1bb1f6c3f38b05060bf699ea2743f7386889bf63 Mon Sep 17 00:00:00 2001 From: David Levine Date: Tue, 31 Jan 2006 02:50:57 +0000 Subject: [PATCH] Added -nocontentid (and -contentid, for symmetry) switch to mhbuild. This allows users to disable generation of the Content-ID: header in MIME messages, in order to placate broken version(s) of Outlook. --- ChangeLog | 12 ++++++++++++ man/mhbuild.man | 12 +++++++++--- uip/mhbuild.c | 18 +++++++++++++++--- uip/mhbuildsbr.c | 5 +++-- 4 files changed, 39 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 33be307..5e09baa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2006-01-17 David Levine + + * uip/mhbuild.c, uip/mhbuildsbr.c, man/mhbuild.man: added + -nocontentid switch, to disable generation of Content-ID: + header in MIME messages. (Also added -contentid for + symmetry.) The default configuration of Microsoft Outlook, + Build 10.0.3416, in particular, doesn't see attachments in + incoming messages if there are Content-ID headers, see + http://home.cwru.edu/~wrv/eudoraoutlookfix.html. This allows + users to easily accomodate that by adding + mhbuild: -nocontentid to their .mh_profile. + 2006-01-29 Oliver Kiddle * bug 4360: uip/replsbr.c: remove trailing newlines from components diff --git a/man/mhbuild.man b/man/mhbuild.man index 674b606..bd1484c 100644 --- a/man/mhbuild.man +++ b/man/mhbuild.man @@ -15,6 +15,7 @@ mhbuild \- translate MIME composition draft .RB [ \-headers " | " \-noheaders ] .RB [ \-ebcdicsafe " | " \-noebcdicsafe ] .RB [ \-rfc934mode " | " \-norfc934mode ] +.RB [ \-contentid " | " \-nocontentid ] .RB [ \-verbose " | " \-noverbose ] .RB [ \-check " | " \-nocheck ] .RB [ \-version ] @@ -312,9 +313,13 @@ character. This description will be copied into the .PP By default, .B mhbuild -will generate a unique \*(lqContent-ID:\*(rq for -each directive; however, the user may override this by defining the ID -using the \*(lq<\*(rq and \*(lq>\*(rq characters. +will generate a unique \*(lqContent-ID:\*(rq for each directive, +corresponding to each message part; however, the user may override +this by defining the ID using the \*(lq<\*(rq and \*(lq>\*(rq +characters. The +.B \-nocontentid +switch suppresses creation of all \*(lqContent-ID:\*(rq headers, +even in the top level of the message. .PP In addition to the various directives, plaintext can be present. Plaintext is gathered, until a directive is found or the draft is @@ -642,6 +647,7 @@ mhlist(1), mhshow(1), mhstore(1), .RB ` \-headers ' .RB ` \-realsize ' .RB ` \-norfc934mode ' +.RB ` \-contentid ' .RB ` \-nocheck ' .RB ` \-noebcdicsafe ' .RB ` \-noverbose ' diff --git a/uip/mhbuild.c b/uip/mhbuild.c index 1c5abdc..cfe776f 100644 --- a/uip/mhbuild.c +++ b/uip/mhbuild.c @@ -59,11 +59,15 @@ static struct swit switches[] = { { "rcache policy", 0 }, #define WCACHESW 15 { "wcache policy", 0 }, -#define VERSIONSW 16 +#define CONTENTIDSW 16 + { "contentid", 0 }, +#define NCONTENTIDSW 17 + { "nocontentid", 0 }, +#define VERSIONSW 18 { "version", 0 }, -#define HELPSW 17 +#define HELPSW 19 { "help", 0 }, -#define DEBUGSW 18 +#define DEBUGSW 20 { "debug", -5 }, { NULL, 0 } }; @@ -85,6 +89,7 @@ int verbosw = 0; int ebcdicsw = 0; int listsw = 0; int rfc934sw = 0; +int contentidsw = 1; /* * Temporary files @@ -219,6 +224,13 @@ main (int argc, char **argv) sizesw = 0; continue; + case CONTENTIDSW: + contentidsw = 1; + continue; + case NCONTENTIDSW: + contentidsw = 0; + continue; + case VERBSW: verbosw++; continue; diff --git a/uip/mhbuildsbr.c b/uip/mhbuildsbr.c index 64ec8a6..83a18b5 100644 --- a/uip/mhbuildsbr.c +++ b/uip/mhbuildsbr.c @@ -51,6 +51,7 @@ extern int verbosw; extern int ebcdicsw; extern int listsw; extern int rfc934sw; +extern int contentidsw; extern int endian; /* mhmisc.c */ @@ -3932,9 +3933,9 @@ build_headers (CT ct) add_header (ct, np, vp); /* - * output the Content-ID + * output the Content-ID, unless disabled by -nocontentid */ - if (ct->c_id) { + if (contentidsw && ct->c_id) { np = add (ID_FIELD, NULL); vp = concat (" ", ct->c_id, NULL); add_header (ct, np, vp); -- 1.7.10.4