On a server I run for a customer, I have MailScanner (don't flame me.. it works!) configure to parse their incoming email.
Anyway, one of their messages got clobbered by MailScanner and rather than quarantining the attachments as it normally does, it quarantined the whole message, and they needed the file from within the message.
The file was base64 encoded within the ASCII body of the message.
Solution:
http://code.activestate.com/recipes/212198/
Basically, this is a one-line (plus...