Decode base64 attachment

To extract an attachment from a raw email message, clean the file to leave only the base64 attachment and do: base64 -di encoded_file > decoded_file