nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [nmh-workers] mhstore and encoded filename | mhfixmsg


From: Ralph Corderoy
Subject: Re: [nmh-workers] mhstore and encoded filename | mhfixmsg
Date: Sat, 17 Aug 2019 13:44:02 +0100

Hi Tom,

>     Content-Type: application/msword
>     Content-Transfer-Encoding: base64
>     Content-Disposition: attachment;
>      filename="=?UTF-8?b?Z21ncCBjb2NoYWlyIGR1dGllcy5kb2M=?="
>     Content-ID: <address@hidden>

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: <address@hidden>
    Date: Sat, 17 Aug 2019 13:18:14 +0100
    Message-Id: <address@hidden>

    ------- =_aaaaaaaaaa0
    Content-Type: application/msword
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment;
     filename="=?UTF-8?b?Z21ncCBjb2NoYWlyIGR1dGllcy5kb2M=?="
    Content-ID: <address@hidden>

    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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]