[Mimedefang] base64 to quoted-printable

Michael Fox news at mefox.org
Tue Oct 10 13:48:53 EDT 2017

I need to convert base64 to something readable.  Per previous suggestions on
this list, I'm going to convert it to quoted-printable.  So far, I'm using:


if ($bh = $entity->bodyhandle) ;

    $qp_body = encode_qp($bh->as_string)



It seems to work (I use md_syslog() to show the first 20 chars).  Is that
right?  Or is there a better way? 


Then, I see an action_change_header(), but no action_change_body().  So,
presume I need to build a new entity by copying headers from the old entity,
replacing the Content-Transfer-Encoding header, and replacing the body.
Then use replace_entire_message().


Does that sound about right?


Also, I've got to believe someone else has needed to do this before.  But
I'm finding it tough to locate examples.  I'm looking at docs for
mime::tools, mime::body, etc. but I'm hoping to locate examples of the
entire process.  Any pointers?





More information about the MIMEDefang mailing list