Hi Tom,
Content-Type: application/msword
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="=?UTF-8?b?Z21ncCBjb2NoYWlyIGR1dGllcy5kb2M=?="
Content-ID: <6a1b0010-c642-a188-6c39-323bb16ebcc4@yahoo.com>
I put this into a test email.
$ cat `mhpath .`
To: ralph
From: ralph
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0"
Content-ID: <29612.1566044293.0@orac.inputplus.co.uk>
Date: Sat, 17 Aug 2019 13:18:14 +0100
Message-Id: <20190817121814.78B7321563@orac.inputplus.co.uk>
------- =_aaaaaaaaaa0
Content-Type: application/msword
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="=?UTF-8?b?Z21ncCBjb2NoYWlyIGR1dGllcy5kb2M=?="
Content-ID: <6a1b0010-c642-a188-6c39-323bb16ebcc4@yahoo.com>
YmFyCg==
------- =_aaaaaaaaaa0--
$
$ mhfixmsg -outfile - 3677 | mhlist -file -
mhfixmsg: did not find semicolon in Content-Type: application/msword
I wonder why mhfixmsg produces those blank stderr lines? Ah, it uses
inform() and that adds one itself,
/* inform calls advertise() with no what and no tail.
* Thus the simple "[invo_name: ]fmt\n" results. */
void
inform(char *fmt, ...)
but the value for fmt that's passed in has one,
inform("did not find semicolon in %s:%s\n", hf->name, hf->value);
and my guess is the third is in hf->value interpolated for the `%s'
before `\n'.
Anyway, popping out of that rabbit hole...
msg part type/subtype size description
...
2 application/msword 24K
disposition "attachment"
filename="gmgp cochair duties.doc"
Note though that it doesn't add in a semicolon.
$ mhfixmsg -outfile - . |
> diff `mhpath .` -
mhfixmsg: did not find semicolon in Content-Type: application/msword
12,13c12
< Content-Disposition: attachment;
< filename="=?UTF-8?b?Z21ncCBjb2NoYWlyIGR1dGllcy5kb2M=?="
---
> Content-Disposition: attachment; filename="gmgp cochair duties.doc"
$
And it only noticed the problem because it was altering the
Content-Disposition field; once that's fixed it doesn't grumble.
$ mhfixmsg -outfile - . |
> mhfixmsg -file - -outfile /dev/null 2> >(wc -c)
mhfixmsg: did not find semicolon in Content-Type: application/msword
0
$
The second mhfixmsg's stderr is empty despite being fed the same field.
--
Cheers, Ralph.
--
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers