[Mimedefang] base64 to quoted-printable
news at mefox.org
Fri Oct 13 11:55:45 EDT 2017
> -----Original Message-----
> But you have a tool here that is flexible enough to do it.
> I suppose you want to take the text/plain MIME part and remove any
> other parts. Others would be just an HTML alternative or something
> that is not text.
Yup. And I'm doing that already, and adding a footer to tell the recipient what was removed. The case I'm trying to solve is when the text/plain or text/html part has Content-Transfer-Encoding of Base64.
> If you happen to know that the original was always plain ascii with
> normal line lengths (80 or less) then I'd tempted to say just go from
> base64 to ascii.
Yup. And "groff -T ascii" has been suggested, just in case there are emoji's or other things to squash. But the quoted-printable suggestion would be less destructive so I'm trying that out first. Either way, 7bit or quoted-printable, I apparently need to more carefully parse the MIME structure and ultimately rebuild the message. Hence, my questions.
> It does make me wonder why it is base64 at all then, but I've been
> seeing mail from Exchange that is always base64, so maybe that is what
> you are dealing with.
In most cases, it's the carrier or email service provider or sender's client app and it's often not something the sending user can control. So rejecting the message results in a complete loss of communications.
Example: send a simple text message like "Hello" from Sprint to an email address and they wrap it in HTML and encode it with Base64.
Sending from Verizon, a simple text message arrives as 7bit plain text. A short text, like "Hello", with one emoji arrives as quoted-printable. A short text message with multiple emoji's arrives as base64. A slightly longer text message, like "Me and the kids are safe at Mom's house. Call when you can.", with multiple emoji's arrives as an attachment. <sigh>
Different things also happen from smart phone email apps. So, "there be dragons". And ultimately, this may be beyond my ability to solve. But I'm not ready to give up yet. If I can convert at least some messages that otherwise would not be readable, it's a win.
a.k.a Don Quixote de La Mancha
More information about the MIMEDefang