Restore Thunderbird Email

Recently I was forced to restore one of my email accounts that I use Thunderbird as my main client. But first a bit of background is in order. The domain that held the account was in a separate package for billing but also on the same provider, 1and1. I simply wanted all my domains to be on the same account but in order to do this a transfer was needed. I initiated all the steps and soon the transfer was under way. I really didn’t think the email would be disturbed since the transferee and the transferrer were one and the same. Me. Boy was I wrong. No sooner than the email that came in stating the transfer was completed, email to the other account stopped. And in addition to stopping, the action erased all of the current content from Thunderbird and all other clients. This was how the process of email recovery was needed. I thought the cloud was safe and probably is unless you transfer your domain.

So the recovery process had begun. I navigated to the folders where Thunderbird stores the email, and was very happy to see this directory listing.

johnny@computer ~/.thunderbird/ifswkzqc.default/ImapMail/ $ ls -l
total 72240
drwxr-xr-x 2 johnny johnny     4096 Aug 17 05:30 Archives-1.sbd
-rw-r–r– 1 johnny johnny     1238 Aug 17 05:42 Archives.msf
-rw-r–r– 1 johnny johnny     1137 Jan 15  2014 Drafts.msf
-rw-r–r– 1 johnny johnny 58492214 Aug 20 16:01 INBOX
-rw-r–r– 1 johnny johnny     9260 Aug 20 16:10 INBOX.msf
-rw-r–r– 1 johnny johnny     1140 Jan 15  2014 Junk.msf
-rw-r–r– 1 johnny johnny       25 Jun 15 04:06 msgFilterRules.dat
-rw-r–r– 1 johnny johnny     2628 Aug 17 05:31 Sent Items.msf
-rw-r–r– 1 johnny johnny     1233 Aug 17 05:42 Sent.msf
-rw——- 1 johnny johnny   843873 Aug 18 01:27 Spam
-rw-r–r– 1 johnny johnny     3047 Aug 19 18:03 Spam.msf
-rw-r–r– 1 johnny johnny     1241 Jan 15  2014 Templates.msf
-rw——- 1 johnny johnny 14448469 Aug 20 16:00 Trash
-rw-r–r– 1 johnny johnny    24495 Aug 20 16:06 Trash.msf

I have highlighted the line for my INBOX file. Notice its size is almost 59 MB. This is the current state of my folders as I write, but there are only four messages accessible in the INBOX. When the account was switched, I can only guess a permission flag was set and that is why they are not accessible. They probably should have been deleted too. I was just glad to see the file size large enough to contain something. I opened the file in Writer and indeed the emails were there but if you’ve ever done this, you would know that they are not be in the friendliest of formats. So some work was in order.

Step one was to copy the originals to preserve anything of value. The next step was to try and use an extension for Thunderbird, ImportExportTools 3.01, to try and recover the email. The first try failed since importing of Imap email is unsupported. That brings us to step two. I copied the files again, but this time to the local folders.

johnny@computer ~/.thunderbird/ifswkzqc.default/Mail/Local Folders $ ls -l
total 56668
drwxr-xr-x 2 johnny johnny     4096 Aug 17 06:16 Inbox
-rwxrwxrwx 1 johnny johnny 58492214 Aug 17 05:30 INBOX    (After the chmod command.)
-rw-r–r– 1 johnny johnny     1806 Aug 20 00:08 Inbox.msf
drwxr-xr-x 2 johnny johnny     4096 Aug 20 00:05 Inbox.sbd
-rw-r–r– 1 johnny johnny        0 Jan 15  2014 Junk
-rw-r–r– 1 johnny johnny     2349 Aug 20 16:40 Junk.msf
-rw-r–r– 1 johnny johnny       25 Aug 19 23:34 msgFilterRules.dat
-rw——- 1 johnny johnny        0 Aug 20 00:06 Trash
-rw-r–r– 1 johnny johnny     2583 Aug 20 00:08 Trash.msf
-rw-r–r– 1 johnny johnny        0 Jan 15  2014 Unsent Messages
-rw-r–r– 1 johnny johnny     2866 Aug 19 23:44 Unsent Messages.msf

After the file copy I modified the file permissions giving it the easy global 777. I wanted the file to be completely unencumbered by any permission. Running the command below from the same directory changed the permissions on the file.

johnny@computer ~/.thunderbird/ifswkzqc.default/Mail/Local Folders $ chmod 777 INBOX

After I ran the command I re-opened Thunderbird. I was hoping to see the messages in the local folders. But no messages were there. I was a bit more than disappointed, but thought I would give the extension one more try. To access the tools, right clicking the account gives you this menu.

ImportExportTools 3.0.1 by Paolo "Kaosmos"

ImportExportTools 3.0.1
by Paolo “Kaosmos”

I chose the Import mbox file as shown above and this time the import was a success. A big thanks goes out to Paolo “Kaosmos” for making the extension available. I will be submitting a donation for this great extension. I am assuming it was the moving of the INBOX file to a local folder and out of the ImapMail folder structure that allowed this to work.

johnny@computer ~/.thunderbird/ifswkzqc.default/Mail/Local Folders $ ls -l

total 56668
drwxr-xr-x 2 johnny johnny     4096 Aug 17 06:16 Inbox
-rwxrwxrwx 1 johnny johnny 57937587 Aug 17 05:30 INBOX
-rw-r–r– 1 johnny johnny     1806 Aug 20 00:08 Inbox.msf
drwxr-xr-x 2 johnny johnny     4096 Aug 20 00:05 Inbox.sbd
-rw-r–r– 1 johnny johnny        0 Jan 15  2014 Junk
-rw-r–r– 1 johnny johnny     2434 Aug 20 17:10 Junk.msf
-rw-r–r– 1 johnny johnny       25 Aug 19 23:34 msgFilterRules.dat
-rw——- 1 johnny johnny        0 Aug 20 00:06 Trash
-rw-r–r– 1 johnny johnny     2583 Aug 20 00:08 Trash.msf
-rw-r–r– 1 johnny johnny        0 Jan 15  2014 Unsent Messages
-rw-r–r– 1 johnny johnny     2866 Aug 19 23:44 Unsent Messages.msf

You may notice the file size is almost the same as the current file. I have trimmed it down a bit but basically it is the same. So that was all there was to recovering my email and an almost tough lesson learned.


Remote Full Upgrade to Linux Mint 17

My Mom lives in Texas and I live in Arizona. So that rules out simply stopping in to upgrade her laptop to the latest Linux Mint Qiana. So the alternatives are, pack up the laptop and send it to me or upgrade via apt and SSH. I imagine you have guessed I picked the latter method. Yes and about three hours later it was finished. No errors this time around.

I am quite impressed with this version of Mint. I have yet to encounter any problems and I am very confident Mom will not either. She loves her Linux computer. And I love the fact that support calls since her days on Windows have ceased to exist and we can talk about something other than a computer problem.


Extremists? Really? According to One Government Agency

This story first broke on a German site, Tagesschau. I first read about this in my Linux Journal email. Apparently Linux Journal is also listed on the NSA extremist list if you go by the scoring system, XKeyscore, that was released. I just have to believe that the NSA has more important things to do than flag the readers of Linux Journal simply because there were some articles on Tor and Tails.

There are as many reasons that people use that software as there are people using it  and more. This is a screwed up world and with the data streams mixing, advertisers getting your every move and add the threat of losing your own identity to a thief, and I can see why people want to remain anonymous. Just because someone wants their web browsing private is not a reason, at least on its own, to flag people or publications as extreme.

What’s in store for the future of this country or the Internet? Will it be commonplace to wear the badge of extremist? Or will the term extremist lose impact when everyone uses Tor and Tails? I really think this is going too far in my opinion. But I don’t have a say in what happens.


Upgraded to Linux Mint 17 Qiana

Last week I upgraded Mint to Qiana. I don’t like to upgrade my main laptop that often, but when I saw that version 17 would be supported to 2019, I had to do it. I downloaded the ISO and prepared a flash drive for the install. I was ready to take the plunge, but during my quick inventory of installed programs, I started thinking of all the little customizations I had done. Not to mention most of the software I use on a regular basis are not in the default Mint image.

I still wanted to upgrade, but not in the traditional method of installing clean and restoring backups. This upgrade was done in almost one command, apt-get dist-upgrade. But first there were a few commands to run in order to prep the system for Qiana. In order for this to be successful, you need to point apt to thee new repositories. This is done with the following commands running them under sudo. I pass thanks for this post for clean instructions. Another of the many reasons I love Linux; when you want to know something, almost every time someone else did it too and wrote about it. The Linux community is world-wide and really does share the wealth of knowledge. You just have to find it. Each command is ran as a single line as sudo or su.

sudo sed -i 's/saucy/trusty/' /etc/apt/sources.list
sudo sed -i 's/petra/qiana/' /etc/apt/sources.list
sudo sed -i 's/saucy/trusty/' /etc/apt/sources.list.d/official-package-repositories.list
sudo sed -i 's/petra/qiana/' /etc/apt/sources.list.d/official-package-repositories.list
Once this is completed, you can proceed with the upgrade. But first some words of caution.
  1. Ensure you have continuous power. This means for laptops to be plugged in.
  2. Set the computer to not sleep. Screen is okay but definitely not the main unit.
  3. Give yourself plenty of time for this to finish. I didn’t time it but it did take a couple of hours.
  4. Have backups ready just in case. You do this anyway, right? Are they tested?
  5. Knowing how to recover if something goes south will always help too.

Once you are ready, from a terminal enter these commands in order.

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get upgrade

This will start the upgrade process and once it is finished, I ran the last command again. You may be wondering just how did the upgrade perform for me? Somewhere in the process my upgrade failed on one item and stopped. I rebooted and was given a nice green screen but without the login section. I entered a terminal by pressing ctrl+alt+F2. I logged in and ran the command sudo apt-get clean. Followed by sudo apt-get dist-upgrade. At this point the upgrade re-started finishing in about a half hour. The next reboot brought me to Linux Mint 17 Qiana. I am glad I knew a few commands and especially the alternate method of logging in.

Mint 17 is running without any problems, but one. It is not a deal breaker nor is it interfering with anything I do, but it is there and I haven’t tackled removing it as if yet. On my panel I have two network indicators instead of the normal one. They both show identical information and if you stop one, it stops the other. Strange, yes. But like I mentioned not a big deal. If anyone knows of a solution, I am all ears.

Update: I was checking items in the Startup Applications menu under Preferences, and I noticed two networking items. And yes I removed one and when I rebooted the laptop, the extra network item on the panel was gone and networking still functions. That was easy. :)

That’s all there is to an upgrade of Linux Mint 16 Petra to Linux Mint 17 Qiana. The small problems were indeed small and I would not hesitate to go this route of upgrading once again as long as I am not experiencing any problems before the process, I don’t expect problems during the upgrade.


My Laptop Will Not Start! – Personal Rant

How many times have you heard this: ‘Hey my laptop will not start-up, can you help me?’. My guess is you’ve heard it many times. And if you are like me, you help them out.

This story began a bit more than a year ago. I wanted to help out one of my extended family members. So I bought a used laptop from Craigslist, (I find most of my laptops this way.), I fixed it up and of course installed Linux. In this case Linux Mint. I install Linux for a couple of reasons; first it is freely licensed. Microsoft Windows would need a key and this was something they did not have; secondly on older hardware, Linux simply outperforms Windows, (Opinion yes, but try it yourself and see to believe.).

The laptop in this case was an older HP model. Probably marketed towards lower-end business users. When I bought the laptop it was loaded with Windows XP and was barely chugging. That may have been the norm ten years ago, but now we are used to using quicker computers. Linux Mint was a perfect fit providing functionality, speed and ease of use. The interface is somewhat familiar enough that most people will be able to do almost anything they need to do.

The delivery, questions, all went without a hitch. That was then, this is now. We were visiting a  couple of weeks ago, and on the couch was the laptop. I noticed it and asked how is it working. The reply was not what I was expecting so I picked it up and turned it on. A few seconds later I was greeted at a prompt that ‘ntldr was missing’. I was disappointed to see that message, but I knew exactly what had happened. They had handed it over to someone to install Windows. But it wasn’t done right, or it was pirate copy, or who knows what else.

I left the laptop alone at that point since I had told them in the beginning I would not work on it if someone installs Windows. I had invested money and time in this laptop and I was willing to help with more instructions if I was ever asked. Disappointed yes, but I had to leave this one alone. Perhaps one day we will be visiting again, and I just might be carrying a flash drive in my pocket. Loaded of course with a Linux ISO or two or three.


Microsoft and Linux, really?

Microsoft and Linux are not usually in the same sentence when it comes to new partnerships. Announced at TechEd a few days ago, Microsoft has released to GitHub, DSC for Linux. DSC stands for Desired State Configuration. Essentially, in a very small nutshell, you configure once and apply to many. I will admit this is still very new to me even on the Windows platform and that’s where I earn my living.

I am stunned and amazed by this move. And I am hopeful that this foray into ‘open-source’ territory will become successful. I personally would like to see more of this coming from Redmond. Let me be very clear, I am not any more a fanboy of Microsoft than I am for Linux, but it pays the bills.

I envision a day when the OS becomes less important and functionality becomes the main attraction. Hardware also becomes transparent to the user. Think Ubuntu. Microsoft has the resources to really get behind this kind of movement. Question is, will the two sides embrace? At least it is a start and I for one like what has happened so far.


Installed Ubuntu Server Beta-2 14.04 Trusty Tahr

Last Saturday I decided to change things up and re-install the distribution on my main server. It is really a small desktop, but serves its function as a lonely server. With the release of Ubuntu 14.04 LTS just days away, I took the plunge and prepared the partition to hold it. I had not installed Ubuntu server in quite a while and was quite pleased with the ease and speed at which I progressed. Finally, after about fifteen minutes or so, Ubuntu was ready to install Grub. Installing Grub2 has usually gone very well for me and I was expecting no less. Even with a final beta, I was confident the install would finish and I would soon be configuring SSH.

That was until the error landed on-screen announcing itself as fatal. But, I was given an option to try again. Why, I am not sure because the fatal error would return and I wasn’t given any new options, nor any other information. Instead you are left with the only option to quit the Grub install and proceed without a boot-loader. There was a slightly helpful hint right before the reboot and gave a quick how to on booting the system. Apparently I am not the only one to see this bug. It happens right after the message ‘Checking for other operating systems.’. My install was not a dual-boot as I have read in the other cases. I know this was a beta, but confidence was high since this was a final beta release. And I sure didn’t expect this to happen, but it did.

Luckily this was hardly an insurmountable error and with a bit of help from Rescatux and chroot, I was happily booting into Ubuntu Server Trusty Tahr for the first time. I really have to hand it to Canonical. They do put out a fine server product and it is definitely getting better and better with each release. I work with servers on a daily basis, but they are nearly all from Redmond. (Not my choice but I do have to provide for the family.) The Grub2 problem aside, total configuration time was less than an hour. This is including setting up SSH and Samba on an Intranet only server. I admit my server needs are not great, but whatever they could be now or in the future, Ubuntu Server 14.04 would most definitely fill the need and then some.


Goodbye Kubuntu, Hello Mint Petra

Yesterday I said goodbye to Kubuntu and my venture into KDE. I have to say it was an overall good experience to use it these last few months. But there was one real deal breaker. At some point, and I can’t really say when, I lost the use of two USB 3.0 ports on the left side of the laptop. In the beginning, I had written off the failures to the possibility a crash to the floor might have damaged them. What would happen is when I plugged a device in, nothing happened except for my mouse, (wireless, dongle plugged into the right side), would go haywire. I would have to reboot to fix this. I searched but found no answers or problems like mine. I also disliked the amount of system resources KDE uses while doing nothing for me. I tweaked KDE some, and tried to shave off a few of the applications I didn’t use, but it was more work to get rid of something and keep the dependencies for other applications, than it was to simply ignore them. My laptop is of modest hardware when compared to current technologies. On more robust equipment I’m sure the few extra clock cycles are never even noticed. But on my system they were noticed. These little widgets, screen enhancements, (many off), all required CPU and RAM. And on my laptop it made for a bit of sluggish performance.

I do applaud the KDE team for creating an environment with so many different objects a person can tweak and use. The KDE desktop is a tweaker’s dream. It seems never-ending in the number of tweaks that can be done. But for me, it is just too much. I like things a bit simpler. But this is just me.

I have come back to Linux Mint but in a new environment for me anyway, Mate. I installed the 64-bit Mint 16, Petra. From the beginning I was totally impressed. The install went very smoothly, and was quicker than I had ever seen. Less than fifteen minutes from the initial boot, to the first login on the new OS. And to top it off, everything is working, including the USB 3.0 ports.  The installer is the same as with previous versions, but it switches a couple of the options to the last and starts copying files very early. I believe this is what gave me the impression of such a quick install. I installed to a Lenovo laptop, G580, with a dual core Pentium, 500GB hard drive and 8GB of RAM.

For right now I am going to stick with Mint and the Mate desktop environment. But who knows what the future will bring. Being able to switch and have a totally new environment, working with about any hardware, and do it all in under thirty minutes is what being a Linux user is all about for me. It boils down to choice. And Linux is my choice.