Sometimes you’ll get an email — without attachments, just text — and that email is base64–encoded for no good reason. Spammers have been known to do that in order to bypass spam filters. Mailing list software has been unwisely configured to send out encoded messages. Or clueless users tweaked their client the wrong way…
The end results:
Debbie was written to address this problem. It will filter a single email message piped into its STDIN, and if said message is found to be:
|and||B.||text–only (plain text, HTML text or generally text/*);|
then Debbie will do four things:
If the message does not satisfy requirements A and B and C, Debbie will simply repeat it unchanged. The same will happen in case of errors (e.g.: an “out of memory” condition, or lack of a base64–encoded message body). If the message body is malformed base64, Debbie will decode as far as it can — and then repeat the rest of the message as–is.
Debbie’s ideal place is in your email processing chain: invoked by procmail (or similar software) before any message body checks and spam filter. If you use procmail, the INSTALL file contains a suitable recipe. In a pinch, you can use Debbie from the shell too.
Version 2.0 — released on October 5, 2019 — includes the following improvements:
Debbie uses the decoding function unbase64 by William Sherif, specially modified for Debbie by Dario Niedermann. See file base64.h for details.