I'm in the middle of integrating mhfixmsg (1.7) into my proxmail setup, and just discovered this behaviour:
# mhfixmsg -verbose -textcharset utf8 -fixcte -noreformat -fixboundary -file /tmp/msg -outfile /tmp/501.fm mhfixmsg: /tmp/msg, will not decode text/html; charset="UTF-8" because it is binary (line length > 998) The comments in the code where this happens are as follows (lines 2118-2123): /* * See if the decoded content is 7bit, 8bit, or binary. It's binary * if it has any NUL characters, a CR not followed by a LF, or lines * greater than 998 characters in length. If binary, reason is set * to a string explaining why. */ I can certainly understand this in the general case, but: - The case which tripped this for me specifically involved a text part; the headers in the message were: Content-Transfer-Encoding: base64 Content-Disposition: inline Content-Type: text/html; charset="UTF-8" MIME-Version: 1.0 The message structure was as simple as it gets: # mhlist -file /tmp/msg msg part type/subtype size description 0 text/html 20K ...so it was clearly marked as text. If a sender packages a binary file but describes it as text/html, it's already broken, and I really don't care if mhfixmsg "damages" it even further. :-/ - More and more senders these days are using auto-generated HTML in which the entire body is a single line of text. This message wasn't even one of those, but the point is that HTML with very long lines isn't unusual anymore. Instead of leaving it base64-encoded, arguably the right thing to do with something like that is to decode it and then run it through an HTML pretty-printer, although I acknowledge that that's beyond the scope of what mhfixmsg is designed to do. :-) So I guess what I'm asking is: I can easily modify my copy of nmh to raise the 998-character limit, but it's not clear to me what I might break by doing so. Would someone please explain what I'm missing here? - Steven -- ___________________________________________________________________________ Steven Winikoff | Concordia University | "Peter's Principle of Success: Montreal, QC, Canada | Get up one more time than steven.winik...@concordia.ca | you're knocked down." | - fortune(6) -- Nmh-workers https://lists.nongnu.org/mailman/listinfo/nmh-workers