Adding Local Folders in Thunderbird

Posted in General on December 5th, 2009 by Johan Huysmans – Be the first to comment

Thunderbird has something called “Local Folders”.
What Local Folders are is described here: http://kb.mozillazine.org/Local_Folders

This webpage however doesn’t explain how to add an extra set of Local Folders.
This is how you can create them.

Open prefs.js with your favorite editor. This file is located inside the profile directory in you thunderbird hidden directory.
Don’t change this file when thunderbird is running.
the serverX and accountX must be unique and could be different on your system

Search for the section defining the existing “Local Folders”, this looks something like this:
user_pref("mail.server.server3.directory", "/home/johan/.thunderbird/pd19vach.default/Mail/Local Folders");
user_pref("mail.server.server3.directory-rel", "[ProfD]Mail/Local Folders");
user_pref("mail.server.server3.hostname", "Local Folders");
user_pref("mail.server.server3.name", "Local Folders");
user_pref("mail.server.server3.type", "none");
user_pref("mail.server.server3.userName", "nobody");

Copy those lines and edit them to your needs:
user_pref("mail.server.server4.directory", "/home/johan/.thunderbird/pd19vach.default/Mail/new_local_folders");
user_pref("mail.server.server4.directory-rel", "[ProfD]Mail/new_local_folders");
user_pref("mail.server.server4.hostname", "New Local Folders");
user_pref("mail.server.server4.name", "New Local Folders");
user_pref("mail.server.server4.type", "none");
user_pref("mail.server.server4.userName", "nobody");

Also add following line:
user_pref("mail.account.account4.server", "server4");

And edit following line:
user_pref("mail.accountmanager.accounts", "account1,account2,account3,account4");

When the changes are made in the prefs.js you can create the new defined local folders. A subdirectory has to be created otherwise it won’t show up in Thunderbird.
mkdir /home/johan/.thunderbird/pd19vach.default/Mail/new_local_folders
mkdir /home/johan/.thunderbird/pd19vach.default/Mail/new_local_folders/Inbox
touch /home/johan/.thunderbird/pd19vach.default/Mail/new_local_folders/Inbox.msf

If everything goes well the new defined local folders directory appears when you open thunderbird.

Apt-rpm dependency problem

Posted in Linux SysAdmin on August 12th, 2009 by Johan Huysmans – Be the first to comment

When installing some rpm’s on a CentOS5 system I encountered a dependency problem.

Apt told me that it depends on a specific file which isn’t provided by any package in the repository. After some investigation I noticed that the rpm WAS available in the repository, and that yum correctly found that package.

The problem was that the specific file needed by the package was a symlink provided by the other package. The symlink file is known by the rpm (rpm -ql /path/to/file gives the rpm) but isn’t know by apt.

Instead of running genbasedir with the location of the repository as only argument, add the –bloat argument.

genbasedir --bloat /path/to/repository

This will solve the problem!


I noticed this problem during the installation of redhat-lsb on a very minimal CentOS5 system. redhat-lsb requires 2 files (which are symlinks), these files are provided by… redhat-lsb itselve…

If you didn’t use the –bloat argument the redhat-lsb package couldn’t be installed with apt, it could be installed with yum or rpm.

mv inuits pinuits

Posted in General on April 1st, 2009 by Johan Huysmans – 1 Comment

Today is announced that Inuits is rebranded to Pinuits.

This change happened to line up with other MySQL consultancy companies, but the P also points to strong focus on Puppet, aPache, Php, Perl, Python, druPal and many other Open-Source Tools.

More information can be found on: http://www.pinuits.be

syslog-ng bug

Posted in Linux SysAdmin on March 19th, 2009 by Johan Huysmans – Be the first to comment

Today I stumpled upon a syslog-ng bug.

We are using syslog-ng-2.1.3 on one of our machines which sends part of his messages over UDP to 2 syslog machines. On some days we noticed that syslog-ng and some other services are stopped. Restarting syslog-ng showed us that they were killed by the OOM-killer.
I directly suspected the java process that was also running on that machine.

After googling around I found this syslog-ng bug: https://bugzilla.balabit.com/show_bug.cgi?id=39

And indeed, we had the same problem. This is how I could reproduce it:

  • Stop the syslog service (on the host which receives the messages)
  • Restart syslog-ng
  • Watch the memory usage of syslog-ng growing until it starts swapping and triggers the OOM-killer

Luckily this bug is already solved, and by upgrading to syslog-ng-2.1.4 the problem is fixed.

CentOS doesn’t provide the rpm packages of syslog-ng, silfreed.net does: http://www.silfreed.net/download/repo/

Ubuntu Intrepid Ibex

Posted in Fedora, Ubuntu on November 7th, 2008 by Johan Huysmans – 1 Comment

Last week a new version was released of Ubuntu, 8.10 aka Intrepid Ibex. It’s already installed on my laptop and it’s looking nice!

The installer still doesn’t support LVM. To be able to install Ubuntu on my LVM partitions I had to follow the steps described in one of my previous posts.

Previously I installed the i386 bit version of distributions on my laptop although it is a x86_64 system. But this time I went for the amd64 version.

You can check if you really have a 64bit processor by checking if there is a “lm” flag for your processor:
$ cat /proc/cpuinfo | grep lm

Using the 64bit version gave some problems, but they are all fixed now:

thunderbird-lightning

The lightning plugin you can download from the add-ons site of thunderbird is the i386 version which doesn’t work with a x86_64 thunderbird. Ubuntu provides a lightning package but this contains some old version. Luckily you can find the x86_64 xpi here: http://releases.mozilla.org/pub/mozilla.org/calendar/lightning/releases/0.9/contrib/linux-x86_64/

sun javaws

The sun javaws isn’t available for x86_64. The openJDK version is available but not all java applications work with that Java WebStart. You can manually install the i386 version of sun-java6-bin:
sudo apt-get install ia32-sun-java6-bin

You can now find the working javaws in following directory: /usr/lib/jvm/ia32-java-6-sun-1.6.0.10/bin/javaws

BTW … Fedora 10 will be released in 18 days

Input/Output redirection, appending

Posted in Linux SysAdmin on August 15th, 2008 by Johan Huysmans – Be the first to comment

In a previous post I wrote about output redirection of STDOUT, STDERR and both to a file. Off course you can do the same to append to an existing file:

ls >> output.txt
ls 2>> error.txt

If you try this with &>> you will receive a bash syntax error:

ls &>> output_and_error.txt
bash: syntax error near unexpected token `>'

How come appending of both STDOUT and STDERR to a file does not work this way? Is this a bug in bash?
Yes, I know I can use the following, but I prefer the &>>:
ls 1>> output_and_error.txt 2>&1

And how come I can’t find a bugzilla for bash?
Yes, I know I can use the command bashbug to send a mail to a mailinglist, but this is not the same as bugzilla.

Installing Ubuntu

Posted in Fedora, Linux SysAdmin on July 18th, 2008 by Johan Huysmans – 3 Comments

This week I reinstalled one of my Fedora machines with an Ubuntu 8.04. Not that I don’t like Fedora anymore but just because I want something new.

One of the big annoyancies I noticed during the installation was that it didn’t recognize my lvm partitions. And I really need that, as my home and root partition are on lvm and I didn’t want to repartition my complete drive.

Luckily I found some explanation for lvm support during the installation. This is the summary of the actions you need to perform.

Become the root user:
ubuntu@ubuntu:~$ sudo -i

Load the dm-mod module:
root@ubuntu:~# modprobe dm-mod

Install the lvm2 package on the live system:
root@ubuntu:~# apt-get install lvm2

Activate the logical volumes of your volumegroup
root@ubuntu:~# lvchange -a y <volgroup name>

At this moment you can perform a normal installation, your existing logical volumes will be recognized and can be used during installation.
After the complete installation process you have to install lvm support for you new installation.

Mount the partitions of your new installation:
root@ubuntu:~# mount /dev/volgroup/root /mnt
root@ubuntu:~# mount /dev/sda1 /mnt/boot
root@ubuntu:~# mount -o bind /dev /mnt/dev

Chroot into your new installation:
root@ubuntu:~# chroot /mnt

Install the lvm2 package:
root@ubuntu:~# apt-get install lvm2

You can now exit your chroot environment and reboot your machine. If everything is OK, you can boot your fresh ubuntu installation.

Shell History Meme

Posted in Fedora, General, Linux SysAdmin on April 10th, 2008 by Johan Huysmans – Be the first to comment

There is a Shell history meme going on on planet Fedora; Let’s join.

[johan@laptop ~]$ history|awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -nr|head
201 ls
108 ssh
108 cd
98 sh
81 su
29 vi
24 rpm
24 ping
23 rm
20 mv

[johan@workstation ~]$ history|awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -nr|head
149 ls
128 cd
125 cvs
93 diff
71 echo
54 ssh
45 for
28 mkdir
26 md5sum
24 reset

My previous post of my Top 10 used commands was more than 1 year ago.

MySQL MYD and TMD files

Posted in Backup, WordPress on April 8th, 2008 by Johan Huysmans – 1 Comment

I just recovered from a database issue.

While running a mysqldump of my databases I received an error. Running a check on that specific database told me that the comments.MYD file was not found.

Investigating on the system showed me that due to an error the filesystem containing /var/lib/mysql was mounted read-only. Running a fsck on that specific filesystem solved that error but didn’t fix my corrupted table.

phpMyAdmin showed that the table was in use and while performing a check or repair it complained about the missing file.

The comments.MYD file was indeed missing, but there was a comments.TMD file, which wasn’t there for all the other tables.

Moving this TMD file to MYD solved the issue. I could repair the table and the check is again successful.

During this problem wordpress didn’t complain but it just didn’t show my comments. But I have no clue what caused this problem.

Fedora upgrade

Posted in Fedora on April 7th, 2008 by Johan Huysmans – 2 Comments

Fedora 9 will be released this month, this means that Fedora 7 will be end-of-live within 2 months (1 month after the release of Fedora 9 to be exact).

As one of my desktops was still running Fedora 7 it was time to upgrade to the current stable Fedora, Fedora 8.

On the Fedora wiki you can find a list of instructions to upgrade your machine using yum. It will list the general actions but also the execptions for each upgrade.
You can find these instructions here: http://fedoraproject.org/wiki/YumUpgradeFaq

The upgrade went very smooth, but isn’t recommended for non-technical users as it all happens on the command line.
For those non-technical users a graphical user interface which guides you through the complete process would be very handy (Ubuntu has it already, don’t know if it is available in Fedora 8/9).
I prefer the upgrade with yum as I want to know what my machine is doing.