What’s Mailody?

Now and then I read blogs on planetkde that I don’t understand. Usually that is because the author starts with explaining some feature which is awesome, but I don’t immediately recall what the application is all about. And I think that I’m guilty of that too. I assumed everyone knows what Mailody and Akonadi is because I explained it five years ago. So here goes.

Mailody is a mail client based on Akonadi. You can compare Mailody with KMail for example. KMail is a great mail application, but for my work flow it does not really fit. Some random differences between KMail and Mailody:

  • Mail sent is by default stored in the folder which is selected. That means it will not break your thread, you always have the whole conversation together. This is optional in KMail.
  • Mailody has a split delete and expunge setup for IMAP. That means that deleting is a two stage sequence, first you delete it, the message will disappear from the user interface. If you want to delete them permanently, you expunge it. This way there is no need for a trash. This is how the IMAP protocol is meant to be.
  • Mailody supports server based flags. That means that if I share a folder with my co-worker, he can mark a message Red in his Thunderbird. Mailody will pick up that change and color the message Red in Mailody.
  • Mailody has Nepomuk support, this means you can make comments to mails like ‘Need to talk to Xyz about this’.
  • Thousands of smaller changes.

Why I not contributed to KMail is history, but in the meanwhile KMail has become a lot better. The code of Mailody is very clean and small and fun to work on. This is also because Mailody uses Akonadi. Akonadi can be divided into two sections.

First there is this database. This database is a cache. If you start Mailody you don’t want to retrieve 20.000 from the IMAP server every time you open kde-core-devel. This cache solves this problem. The 20.000 messages are cached there and when you open that folder, it retrieves it from that cache. Which is of course much faster. The database is fed by plugins (they are called resources). There is an IMAP plugin, a POP3 plugin, a VCard plugin etc. Each of these resources are responsible for feeding the cache. Each store it in their own part of the database. This means that not every application has to be able to have a library for talking IMAP. No, Akonadi knows how to do that.

The second part of Akonadi are the convenience classes for KDE. There is no need for each application to learn how to talk to the database. We made some classes for that. The Mailody view which displays all the messages in a folder is a model/view which is coming from Akonadi. You simply indicate which part of the database you want to view. Every item can be manipulated through KJobs for example.

Although the above is a very short introduction into Akonadi, I can give some powerful examples. Because Akonadi is central, it will share stuff. If Mailody changes an item, it will be instantly visible in KMail. Accounts are shared between Mailody and KMail. Mailody can easily show Newsgroups (folders are the newsgroups, the rest is the same). We can also let daemons run in the background. Take threading. KMail and Mailody thread the messages on display. This a very hard job to do right and causes delays in opening folders. We can let a daemon run in the background which already threads all messages. When Mailody opens a folder it will receive a threaded model/view with all the work done already.

I hope this will give you some insight about what Mailody and Akonadi are. Mailody is not ready for general usage though. Hopefully it will be ready in a few months for a beta. If you want more explanations about a certain subject, just drop a comment, I can blog a Part II if people want.

4 Comments

  1. Can it be build against kde 4.3.* ?

    Seems like mailody still uses the ?depreciated? akonadi_next… and fails to build….

  2. Insightful post.

    I’ve got a question about Akonadi: In what level is Akonadi right now, speaking in terms of stability and features? Has it reach the goal yet, for what it was designed?

    Thank you.

  3. no. it will not compile against 4.3.1. it needs trunk. akonadi-next is not deprecared, it just contains some goodies waiting to be merged to kdepimlibs!

  4. @kedadi

    Akonadi is quite stable now (haven’t seen any server crashes since half a year)
    and with KDE 4.4 the new version of KAddressBook will be shipped, that is completely
    based on Akonadi.

    Of course there are still some issues left
    – a C++ API for searches
    – a final design for virtual folders
    – porting of all the old resources to Akonadi resources
    but we hope to address some of them on our Akonadi sprint in October.