jkt's blog

Blößmrt

Entries from August 2009.

Introducing Trojitá, a Qt IMAP e-mail client
2009-08-31

History

When I looked at the state of graphical IMAP e-mail clients several years ago, I was not really impressed. KMail from then-current KDE3 did not do a proper job for me (numerous IMAP bugs like its inability to work as about every other IMAP client when deleting messages, bug 26986 -- there were more issues than that, but years have left my memories washed out a bit), Thunderbird would crash for me every once a week, at least, and I just happened to like KDE applications more than Gnome stuff, so I did not spend much time looking at Evolution. Many MUAs looked like a classic generic e-mail clients designed with POP3 in mind with IMAP added late in the development cycle, while others supported wide range of IMAP features, yet lacked in the GUI part of the problem. In short, using none of these applications made me feel happy.

A programmer not feeling happy is a receipt for disaster. I was about to finish my high school, so I had plenty of time at hand. I was experimenting with Python, so that seemed like a natural implementation language, too. In the end, I started a project called trojita whose remnants could still be seen in an abandoned SVN repo.

Coding in Python was fun. I tried several different approaches to the design of my pet program, I was playing with technologies I had no experience with, I even showed my "IMAP library" at my final exam as an example of a project I made. It did not have much functionality, in fact, only the IMAP parser had been completed, but it was an educative experience nonetheless and I passed the exam.

After some time, however, I discovered Qt and C++ and felt in love. I joyfully returned to the realm of statically-typed languages and suddenly felt a lot better. I began porting my Python library to Qt/C++. It was not really a port, rather a first complete rewrite of my project. Anyway, it did not take long and the C++ version suddenly offered more functions than the old Python branch, with unit tests as a nice added bonus.

Qt's Interview architecture, the Model/View classes, seemed like a decent implementation of the MVC patter I was poking around to use. Several months have passed, and suddenly trojita was able to show a tree of mailboxes stored on a remote IMAP server, listing messages contained therein and showing message bodies. I choose to finish the program as a part of my bachelor's thesis, and ultimately, I succeeded.

The Code

So, in a few blogposts starting with this one I'm going to introduce a new Qt IMAP e-mail client to the world. I hope I will get some attention and folks looking at the code and trying to run the application. I'd love to get some feedback on program design, code quality and general usability as well.

The code is hosted at Gitorious, and a bachelor thesis about Trojitá (PDF) (mirror) which explains its design and compares it against several alternatives is available, too. Perhaps the most interesting part is Chapter 3 which describes the architecture of the application, and Chapter 4 in which I compare Trojitá to several other MUAs on the market. All information about Trojitá are also aggregated on Trojitá's homepage (any web designer listening? :) ). Here is the obligatory screenshot: A
screenshot of Trojitá, a Qt IMAP e-mail client

Trojitá's Features

Some highlights of Trojitá are:

The thesis was completed several months ago. Since that time, I've removed the dependency on std::tr1::shared_ptr and switched to Qt's QSharedPointer which in turn requires Qt-4.5 or newer. There wasn't much more changes since then, as I enjoyed quite a long vacation, but I guess I can tell the development is getting faster again.

How to Use it

It's a fairly standard CMake setup:

git clone git://gitorious.org/trojita/trojita.git
cd trojita
mkdir _build
cd _build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
make -j4
./trojita

Please do join the #trojita channel on Freenode and tell me how you like this application. I'm open to any suggestions and would love to hear any feedback, too.


As you can see, this blog is a static HTML page, so you can't post any comments here. However, I'm eager to answer any questions sent to my mail, both via e-mail and in subsequent blog posts.

Tags: gentoo, kde, qt, trojita.