UNIX / Linux keyboard.

How and why to migrate your e-mail from KDE KMail to Mozilla Thunderbird

KMail and KDE Development

The KDE suite of tools and desktop environment was first released in July, 1998. I started using it soon afterward, and began using its KMail tool in January, 2001. Yes, once or twice a year I go to my sent messages and delete the gratutiously large ones with little content, such as when I send digital pictures to someone, and make a compressed archive of the rest. So, I can find my first KMail message:

From: Bob Cromwell <bob.cromwell@home.com>
Reply-To: bob.cromwell@home.com
Date: Tue, 30 Jan 2001 13:10:13 -0500
X-Mailer: KMail [version 1.1.99]
Content-Type: text/plain;
To: cromwell@ecn.purdue.edu
Subject: test
MIME-Version: 1.0
Message-Id: <01013013101302.01954@ct721463-a.lafayt1.in.home.com>
Content-Transfer-Encoding: 8bit
Status: RO
X-Status: S

kmail test

KMail, which led to the Kontact suite, worked great for me. It had a clean interface and integrated nicely with the GnuPG PGP plugin.

But with an upgrade to OpenBSD 5.5 a great many changes were underway. OpenBSD was shifting from KDE 3.5.10 to 4.11.5. Both versions were included, but with KDE 4.0 out since January, 2008, KDE 3.5.10 dating back to August, 2008, and Plasma 2 Workspaces scheduled to release in a couple of months, it seemed like time to move ahead before 3.5 disappeared in a coming version.

Besides, the 5.5 upgrade guide warned that the next upgrade, to 5.6, would have plenty of other big changes: BIND would be replaced by NSD and OpenBSD's modified Apache web server would be pulled from the base system as they complete the transition to nginx.

Moving to KDE 4.11.5 made things messy and complicated enough, as it brings in NEPOMUK and Akonadi.

NEPOMUK stands for Networked Environment for Personal, Ontology-based Management of Unified Knowledge and is a project to develop what they call a social semantic desktop that "enriches and interconnects data from different desktop applications using semantic metadata stored as RDF". It was an EU-funded research project in 2006 through 2008. The Nepomuk-KDE page provides the following example, pasted in here with errors intact:

Say you received a photo from a friend of yours, 2 weeks ago. You saved it somewhere on your computer. Now how to you find that file? If you don't remember the location, you're out of luck.

Now Semantic Search aims to help you. You know this file came from that friend of yours, your computer does not. Search, however, can remember this relationship. Searching on the name of your friend will therefor pop up the photo!

Well, yes, that could help, but it would only work if I had done all the needed ontological labeling of the file when I received it. It's from that specific friend, who belongs to a specific category or group of my friends, it shows specific things, it is a specific type of JPEG file (digital photograph from a smart phone, versus from a traditional digital camera, versus a scan of a photograph, and so on), and could need who knows how many ontological details received. Who know what I will be searching for in two weeks — pictures from that friend, or pictures of newly purchased automobiles, or pictures taken on certain ranges of dates, or taken at certain times of day, or ...

Akonadi, meanwhile, is a storage service for PIM (or personal information management) data and metadata, and it does desktop object identification and retrieval.

Yes, there are some very interesting problems in philosophy (ontology) as well as cognitive psychology, human-computer interaction, and artificial intelligence, and projects like Nepomuk and Akonadi support the development of practical solutions.

But, I'm just not interested in using that technology right now on my personal desktop or notebook computer.

Goodbye KMail

KMail starts with its screen greyed out and this message overlaid on the main window:

Akonadi logo
The Akonadi personal information management service is not running.
This application cannot be used without it.

Starting it spawns the following list of processes. I have removed the xterm in which I started KMail, along with its shell and SSH agent:

cromwell  6341  9.3  0.9  7720  28300 ??  I     12:13PM    0:35.27 kded4
cromwell  2237  0.0  0.1  1532   2136 ??  Is    12:13PM    0:00.68 /usr/local/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
cromwell  6467  0.0  0.2  2676   7544 ??  S     12:13PM    0:00.79 /usr/local/bin/akonadi_control
cromwell 31304  0.0  0.6 21980  18400 ??  S     12:13PM    0:01.97 akonadiserver
cromwell 12782  0.0  0.4  1768  11568 ??  Is    12:13PM    0:00.05 kdeinit4: kdeinit4: kdeinit4 Running... (kdeinit4)
cromwell 20183  0.0  0.7  2548  21772 ??  I     12:13PM    0:00.33 klauncher --fd=8
cromwell  4778  0.0  0.9  4520  27500 ??  I     12:13PM    0:00.64 /usr/local/bin/akonadi_agent_launcher akonadi_akonotes_resource akonadi_akonotes_resource_0 (akonadi_agent_la)
cromwell 19613  0.0  0.9  4528  27464 ??  I     12:13PM    0:00.60 /usr/local/bin/akonadi_agent_launcher akonadi_akonotes_resource akonadi_akonotes_resource_2 (akonadi_agent_la)
cromwell 27949  0.0  0.9  4516  27480 ??  I     12:13PM    0:00.61 /usr/local/bin/akonadi_agent_launcher akonadi_akonotes_resource akonadi_akonotes_resource_1 (akonadi_agent_la)
cromwell 14334  0.0  2.2  8740  67996 ??  I     12:13PM    0:04.33 /usr/local/bin/akonadi_archivemail_agent --identifier akonadi_archivemail_agent (akonadi_archivem)
cromwell 10646  0.0  1.3  6392  40264 ??  I     12:13PM    0:01.30 /usr/local/bin/akonadi_maildispatcher_agent --identifier akonadi_maildispatcher_agent (akonadi_maildisp)
cromwell 27844  0.0  2.2  8852  68092 ??  I     12:13PM    0:04.36 /usr/local/bin/akonadi_mailfilter_agent --identifier akonadi_mailfilter_agent (akonadi_mailfilt)
cromwell  2995  0.0  1.4 13256  41564 ??  I     12:13PM    0:01.21 /usr/local/bin/akonadi_mixedmaildir_resource --identifier akonadi_mixedmaildir_resource_0 (akonadi_mixedmai)
cromwell  5836  0.0  1.1  6352  32956 ??  I     12:13PM    0:02.59 /usr/local/bin/akonadi_nepomuk_feeder --identifier akonadi_nepomuk_feeder (akonadi_nepomuk_)
cromwell 27190  0.0  1.4  6360  41512 ??  I     12:13PM    0:01.45 /usr/local/bin/akonadi_newmailnotifier_agent --identifier akonadi_newmailnotifier_agent (akonadi_newmailn)
cromwell  6921  0.0  1.1  5820  32964 ??  I     12:13PM    0:00.77 /usr/local/bin/akonadi_pop3_resource --identifier akonadi_pop3_resource_0 (akonadi_pop3_res)
cromwell  2799  0.0  1.1  5768  32964 ??  I     12:13PM    0:00.77 /usr/local/bin/akonadi_pop3_resource --identifier akonadi_pop3_resource_1 (akonadi_pop3_res)
cromwell 24945  0.0  2.1  7656  63096 ??  I     12:13PM    0:03.66 /usr/local/bin/akonadi_sendlater_agent --identifier akonadi_sendlater_agent (akonadi_sendlate)
cromwell 26486  0.0  0.9  4264  26976 ??  I     12:13PM    0:00.50 /usr/local/bin/akonadi_agent_launcher akonadi_vcard_resource akonadi_vcard_resource_0 (akonadi_agent_la)
cromwell 12454  0.0  0.1   540   1920 ??  I     12:13PM    0:00.01 /usr/local/libexec/gam_server
cromwell  9190  0.0  1.0  7140  30972 ??  I     12:13PM    0:00.58 /usr/local/bin/kwalletd
cromwell  4136  0.0  1.0  7292  31860 ??  I     12:14PM    0:00.76 /usr/local/bin/kwalletmanager --kwalletd
cromwell 31871  0.0  0.1   612   1624 p0  I     12:13PM    0:00.00 /usr/local/bin/dbus-launch --autolaunch 7c0ca4fe052589165cd10001537512b6 --binary-syntax --close-stderr
cromwell 29859  0.0  3.4 86208 105352 p0  S     12:13PM    0:09.96 kmail

The relevant parts of the process tree look like this:

 |--= 02237 cromwell /usr/local/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
 |-+- 06467 cromwell /usr/local/bin/akonadi_control
 | |--- 31304 cromwell akonadiserver
 | |--- 04778 cromwell /usr/local/bin/akonadi_agent_launcher akonadi_akonotes_resource akonadi_akonotes_resource_0 (akonadi_agent_la)
 | |--- 27949 cromwell /usr/local/bin/akonadi_agent_launcher akonadi_akonotes_resource akonadi_akonotes_resource_1 (akonadi_agent_la)
 | |--- 19613 cromwell /usr/local/bin/akonadi_agent_launcher akonadi_akonotes_resource akonadi_akonotes_resource_2 (akonadi_agent_la)
 | |--- 14334 cromwell /usr/local/bin/akonadi_archivemail_agent --identifier akonadi_archivemail_agent (akonadi_archivem)
 | |--- 10646 cromwell /usr/local/bin/akonadi_maildispatcher_agent --identifier akonadi_maildispatcher_agent (akonadi_maildisp)
 | |--- 27844 cromwell /usr/local/bin/akonadi_mailfilter_agent --identifier akonadi_mailfilter_agent (akonadi_mailfilt)
 | |--- 02995 cromwell /usr/local/bin/akonadi_mixedmaildir_resource --identifier akonadi_mixedmaildir_resource_0 (akonadi_mixedmai)
 | |--- 05836 cromwell /usr/local/bin/akonadi_nepomuk_feeder --identifier akonadi_nepomuk_feeder (akonadi_nepomuk_)
 | |--- 06921 cromwell /usr/local/bin/akonadi_pop3_resource --identifier akonadi_pop3_resource_0 (akonadi_pop3_res)
 | |--- 27190 cromwell /usr/local/bin/akonadi_newmailnotifier_agent --identifier akonadi_newmailnotifier_agent (akonadi_newmailn)
 | |--- 24945 cromwell /usr/local/bin/akonadi_sendlater_agent --identifier akonadi_sendlater_agent (akonadi_sendlate)
 | |--- 02799 cromwell /usr/local/bin/akonadi_pop3_resource --identifier akonadi_pop3_resource_1 (akonadi_pop3_res)
 | \--- 26486 cromwell /usr/local/bin/akonadi_agent_launcher akonadi_vcard_resource akonadi_vcard_resource_0 (akonadi_agent_la)
 |-+= 12782 cromwell kdeinit4: kdeinit4: kdeinit4 Running... (kdeinit4)
 | \--- 20183 cromwell klauncher --fd=8
 |--- 06341 cromwell kded4
 |--- 12454 cromwell /usr/local/libexec/gam_server
 |--- 09190 cromwell /usr/local/bin/kwalletd
 |--- 04136 cromwell /usr/local/bin/kwalletmanager --kwalletd
 |--- 31871 cromwell /usr/local/bin/dbus-launch --autolaunch 7c0ca4fe052589165cd10001537512b6 --binary-syntax --close-stderr
 |--- 29859 cromwell kmail

Running Thunderbird instead, things are much quieter. It was time to transition from KMail to Thunderbird.

cromwell 10383  0.0  0.0   788   1464 ??  Is    12:30PM    0:00.00 /usr/local/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
cromwell 32115  0.0  0.1   788   3432 ??  S     12:30PM    0:00.01 /usr/local/libexec/gconfd-2
cromwell 12647  0.0  4.3 96408 130192 p0  S     12:30PM    0:29.02 thunderbird
cromwell  3091  0.0  0.1   780   1624 p0  I     12:30PM    0:00.00 /usr/local/bin/dbus-launch --autolaunch 7c0ca4fe052589165cd10001537512b6 --binary-syntax --close-stderr

Let's see which package contains KMail. Looks like it's kdepim.

OpenBSD:~ % which kmail
OpenBSD:~ % pkg_info -E /usr/local/bin/kmail
/usr/local/bin/kmail: kdepim-4.11.5p0
kdepim-4.11.5p0     KDE personal information management

What related packages have been installed — kdepim and related plus NEPOMUK and Akonadi?

OpenBSD:~ % pkg_info | egrep 'kdepim|nepomuk|akonadi'
akonadi-1.11.0p0    PIM cache and access services
kdepim-4.11.5p0     KDE personal information management
kdepim-runtime-4.11.5p2 KDE PIM runtime support
kdepimlibs-4.11.5p0 libraries for KDE PIM services
nepomuk-core-4.11.5 KDE Nepomuk core libraries
nepomuk-widgets-4.11.5 Nepomuk-based KDE Plasma widgets

Could I live without kdepim? Easily:

OpenBSD:~ % pkg_info -L kdepim | grep 'bin/'

Right away I find that kdepim is in the list of packages not required by others, so it could be removed:

OpenBSD:~ # pkg_info -t | egrep 'kdepim|nepomuk|akonadi'
kdepim-4.11.5p0     KDE personal information management
OpenBSD:~ # pkg_delete kdepim
kdepim-4.11.5p0: ok
Read shared items: ok

I can't get rid of the others as they are required by KDE components I must keep. kde-workspace includes the Plasma desktop itself, and kde-baseapps includes the Konqueror file and web browser. They directly require the packages kdepim-runtime, kdepimlibs, nepomuk-core, and nepomuk-widgets, and the first two of those require akonadi.

OpenBSD:~ $ pkg_info -R akonadi kdepim-runtime kdepimlibs nepomuk-core nepomuk-widgets

Information for inst:akonadi-1.11.0p0

Required by:

Information for inst:kdepim-runtime-4.11.5p2

Required by:

Information for inst:kdepimlibs-4.11.5p0

Required by:

Information for inst:nepomuk-core-4.11.5

Required by:

Information for inst:nepomuk-widgets-4.11.5

Required by:

If I Can't Delete NEPOMUK and Akonadi, At Least I'll Disable Them

Start the System Settings tool and go to Desktop Search. Disable that to keep NEPOMUK from being started.

Next, do the part that is very easy to overlook. By default there will be a clock widget at the right end of the bottom taskbar, and by default it will try to report events from your personal calendar. And to do that, even if you haven't set up a personal calendar, it will start Akonadi with its many processes.

So, right-click on the taskbar clock, select Digital clock settings, click the Calendar section and de-select Display events.

Hello Thunderbird

Import Messages from KMail

Use Thunderbird's Add-ons Manager (under the Tools menu) to install the ImportExportTools extension.

Recent versions of KMail store messages under ~/.kde/share/apps/kmail (older versions may use ~/.Mail). Within that area, the directory mail/inbox/cur will contain files with your current inbox. If you have created folders within your inbox, their messages will be in mail/.inbox.directory/FolderName/cur/*.

Create new folders as needed. Then for each folder including Inbox, right-click, select ImportExportTools, then Import Messages, and then navigate to the appropriate KMail directory. You will need to click on the pencil-and-paper button to create the Location box where you can type, otherwise the interface will not off you choices with "." as their first character.

Configure GnuPG

Install the enigmail package. Note that if you search for the Enigmail plugin for Thunderbird, it disable itself. Use the enigmail package from OpenBSD.

Verify that you have installed the graphical tool for entering your PGP pass phrase:

OpenBSD:~ $ which pinentry-gtk-2 

That should return something, /usr/local/bin/pinentry-gtk-2 on OpenBSD. If it instead complains "Command not found" then you need to add a package, probably pinentry-gtk2.

With the code in place, right-click on your address in the upper left Thunderbird pane and select Settings. Then click OpenPGP Security to configure using OpenPGP, specify using your email address to identify your key (or else tell it which PGP key ID to use), and select if you want to sign messages by default.

Allow Longer Lines

Thunderbird imposes a 72-character maximum line length when you are composing a message. You can increase that length.

Go to Edit then Preferences, select the Advanced sub-panel and its General tab, and click Config Editor.

Type wrap in the search box and make your change.

Config Editor in Thunderbird

Note that the boolean mail.wrap_long_lines does not effect mail you are composing to send. Instead, change mailnews.wraplength to 300 characters or so. That should be plenty for the longest URL you will need to paste into place.

Plain Text Only

Right-click the account in the upper-left pane, select Settings, then Composition & Addressing. Uncheck Compose messages in HTML format.

Linux and Open-Source Topics