[Spambayes] It gets funnier all the time....
skip at pobox.com
Wed Feb 12 14:08:35 EST 2003
Tim> Ya, I just discovered that too... so back to the original mail that
Tim> started this whole thing. Was that not base64? - TimS
What about this? No c-t-e header, so the base64 crap will come back
unchanged. If the first "word" of the decoded payload is longer than 60
characters, feed to the base64 fixer-upper:
*** /tmp/skip/tokenizer.py.~1.4~ Wed Feb 12 14:06:51 2003
--- /tmp/skip/tokenizer.py Wed Feb 12 14:06:51 2003
*** 1331,1336 ****
--- 1331,1339 ----
# Decode, or take it as-is if decoding fails.
text = part.get_payload(decode=True)
+ if len(text.split()) > 60:
+ # just in case it's encoded but no c-t-e header was given
+ text = try_to_repair_damaged_base64(text)
yield "control: couldn't decode"
text = part.get_payload(decode=False)
More information about the Spambayes