nmh-workers
[Top] [All Lists]

[nmh-workers] mhstore and encoded filename | mhfixmsg

2019-08-16 20:01:15
Consider:

    $ mhlist 3677
     msg part  type/subtype              size description
    3677       multipart/mixed            34K
             boundary="----=_Part_985234_1081815005.1565970594687"
         1     multipart/alternative      598
             boundary="----=_Part_985233_613472701.1565970594686"
         1.1   text/plain                  61
             charset="UTF-8"
         1.2   text/html                  256
             charset="UTF-8"
         2     application/msword         24K
             disposition "attachment"
               filename="=?UTF-8?b?Z21ncCBjb2NoYWlyIGR1dGllcy5kb2M=?="

header snip from msg 3677:

    ------=_Part_985234_1081815005.1565970594687
    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>

mhstore is not decoding the filename:

    $ mhstore -auto -part 2
    storing message 3677 part 2 as file 
[...]/=?UTF-8?b?Z21ncCBjb2NoYWlyIGR1dGllcy5kb2M=?=

I was about to post for help, then I tried:

    $ mhfixmsg -outfile - 3677 | mhlist -file -
    mhfixmsg: did not find semicolon in Content-Type: application/msword


     msg part  type/subtype              size description
       0       multipart/mixed            34K
                 boundary="----=_Part_985234_1081815005.1565970594687"
         1     multipart/alternative      599
                 boundary="----=_Part_985233_613472701.1565970594686"
         1.1   text/plain                  61
                 charset="UTF-8"
         1.2   text/html                  257
                 charset="UTF-8"
         2     application/msword         24K
                 disposition "attachment"
                   filename="gmgp cochair duties.doc"

So maybe this post will help someone else.

"mhfixmsg rewrites MIME messages, applying specific transformations such as
decoding of MIME-encoded message parts and repairing invalid MIME headers" It
would be interesting to hear some background on why these repairs are needed.
msg 3677 is from yahoo email.  I assume some email clients are worse than
others / which ones?

I'm not running mhfixmsg on each message, so I have to remember this workaround.

--
thanks!,
Tom


-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>