Base64 file converters?

Does OpenSuSE have any base64 file converters? I’ve just heard that Ubuntu has one built in.
I’m asking because I have some old archived emails (from Mozilla Mail) and some of the emails have attachments. I’ve been told a way to convert the jpg and gif images but I also need some pdf’s and doc’s and ms excel documents to convert too.

I run SuSE 11.2 and I use KDE as my desktop environment.

On my 11.3, it’s installed. I have no reason to believe it should be different for 11.2.

Try this

base64 --help


That worked, I have it. Now, how to use it?
The help file says: base64 [OPTION]… [FILE]
So, would I put in

 base64 -d [then all the file's code such as CD3iKz2dtjWur7i9myuPzY8diQ2tLzhbLhBCUFJAOc/nD4cik8G39ISyVPpaL6tLadJUSc45

(that was only the bottom half of a photo. I couldn’t put the whole thing in here obviously).

Are the emails not in your regular mail program’s directories? You can work with attachments inside Thunderbird, Kmail, what have you, if they are standard format emails.

Or is it too much work to treat them one by one in a GUI? If you want something that you can run from the CLI or scriptable, look at the metamail program, which comes from the metamail package.

Do you know how your content was originally created?

Typically, many “viewer” apps that support Base64 encryption will have the functionality built-in, eg Launch the app, use the app to open the file, click something like “Base64…”

You may have to look for an old app, Base64 has long been considered a marginal security measure, it’s AFAIK today it’s probably used more often simply to encode alternate content (eg media files) into an ASCII string for easy transport. Newsreaders (ie Usenet) are good examples for this.

In fact, I’d bet that you could probably point just about any Usenet app to your files and it would work.

As for the base64 utility itself, I agree the help instructions are cryptic. Here you go.

base64 -d *file* > newfilename.txt

Of course, change the file extension appropriately so the default viewer will be invoked.

You can encode by running the same syntax but without any options.


All of the old emails (from 2008 and older) have been saved by Mozilla Mail (and SeaMonkey Mail) as one file in a subfolder named, “Recieved”. I can also get to the mail folders named, “Sent” and “Drafts” ("…/[mozprofilestring]/Mail/Local Folders/Recieved" or Drafts, etc.). I can open these old folders as one text file and get the text I wanted. Trying to just open the folder within SeaMonkey Mail only gives me the text, and you cannot view the attachments.
So, it would be tedious to try and separate each and every email (a few hundred at least) contained within those folders (what would they be saved as anyway? .txt? .eml?) however, it’s easy to spot the attachments and I can just scroll down to them and select the base64 characters and copy that to the clipboard. I was hoping that it would just be a matter of pasting the clipboard contents into a converter to get the photo or pdf or doc or powerpoint attachment.

On 2010-12-05 21:06, gymnart wrote:

> I
> can open these old folders as one text file and get the text I wanted.
> Trying to just open the folder within SeaMonkey Mail only gives me the
> text, and you cannot view the attachments.

Recreate the indexes.

Or, you can read the mbox file with another client, like Alpine. It is text
only, but it can launch viewers, or save the attachments.

Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

I just tried out Alpine. It couldn’t handle it. The files either have no extension or the others have a .msf after the name. (Incidentally, KMail says when opening the file: “The file contains multiple messages. Only the first message is shown.”)

How do you recreate the indexes? I’ve never done anything like that before.

They’re in a format called mboxrd (search for it). There are various programs that will read that format and various converters.

You can import those files into Thunderbird. It’s a pity you didn’t do this while the previous Mozilla profile was active.

Importing and exporting your mail - MozillaZine Knowledge Base
Migrate from Mozilla Suite or Netscape to Thunderbird - MozillaZine Knowledge Base

Thank you for that information. I had no idea that I could use Kmail for what I needed to do. Kmail’s import feature allowed me to specify where those email folders were and then I finally was able to get at the pdf and photos I needed. It’s wonderful being able to go over those old lost emails again!

Thanks again. :smiley: