[Mimedefang] base64 to quoted-printable

John Nemeth jnemeth at cue.bc.ca
Fri Oct 13 12:47:54 EDT 2017

On Oct 11, 11:54pm, "Michael Fox" wrote:
} > -----Original Message-----
} > If the old client that you are accommodating is running on (or even just
} > displaying on) a reasonably modern OS, there's a strong chance that
} > you'll actually do better for readability by using UTF-8 as the
} > character set and "8bit" encoding instead of QP. Many (but not all)
} > older mail clients don't really know MIME but do happily pass through
} > all 8 bits of every byte to their output, whether it's a terminal driver
} > or a GUI API.
} Thanks Bill.
} Unfortunately, it's an amateur radio BBS written in the 80s that

     Which app is it?

} only understands plain text.  It was pretty advanced in its time

     Something this old may not understand quoted-printable.

} in that it uses SMTP internally.  But no MIME, no UTF-8, etc.
} It's still extremely useful and widely used, especially in
} emergency comms, delivering mail over VHF radio where other
} connectivity isn't available.

     I have a similar requirement to modify a message where I'm
using action_external_filter().  My filter() function looks like

sub filter ($$$$) {
    my($entity, $fname, $ext, $type) = @_;

    return if message_rejected(); # Avoid unnecessary work

    if ($fname eq "Cisco_fax.tif") {
        #  convert incoming fax to pdf
        md_syslog('info', 'converting tiff to pdf');
        action_external_filter($entity, "/usr/pkg/bin/tiff2pdf -o ./FILTEROUTPUT ./FILTERINPUT");
        my $head = $entity->head;
        $head->replace('content-type', 'application/pdf; name="Cisco_fax.pdf"');

    return action_accept();

There should probably be some more error checking such as making
sure that action_external_filter() succeeds.  Perhaps if you look
at the definition of action_external_filter() in mimedefang.pl it
will give you some ideas.  It's a fairly simple function (most of
it is error checking).


Note that I've only had licence for a couple of years and am still
getting my feet wet, but I'm definitely interested in data and
emergency comms.  I've recently started playing with RMS Express
(over telnet).  The next thing I want to do is get a TNC.

}-- End of excerpt from "Michael Fox"

More information about the MIMEDefang mailing list