OpenPaaS’ Newsletter — March 2018

Please, just call me James

Mar 22, 2018 · 5 min read


At Linagora, a dedicated team of developers works on integrating James, a modern email server, with OpenPaaS, our open source collaborative platform. In addition to that, the James team — as we call them internally — also spends a great deal of time improving this email server, perhaps most notably by being active contributors to the Apache James project. As the name entails, James is proudly hosted by the Apache Software Foundation.

For months, we haven’t covered what the James team have done to improve their favorite email server. We intend to fix that by highlighting their most recent progress, which — spoiler alert — revolves around how James process emails. But before we dive in, a personal note from Laura Royet, which I am very grateful to for guiding me through my first month as the new OpenPaaS community manager.

“For my part, this is my last newsletter as the OpenPaaS community manager. I’m glad to had the opportunity to initiate this publication and also happy to pass the baton to Lukas, my successor.” Laura Royet

Image for post
Jame’s Logo, courtesy of the Apache Software Foundation

Call me James

James stands for Java Apache Mail Enterprise Server. In a nutshell, what does it look like under the hood?

  • James is a modular, Java-based email server;
  • It is compatible with a wide variety of protocols, including the promising JMAP, whose explicit goal is to replace the now aging IMAP;
  • It can be interfaced with many storage or database technologies, including Cassandra and Elasticsearch;
  • It can be administrated using different means, including the good ol’ command line or the ubiquitous RESTful web service.

To sum it up, James is relatively agnostic by design, thus allowing its users to pick their favorite technology as they see fit. For instance, in OpenPaaS context, Cassandra has been chosen to store emails.

Do you want to know more about James? If so, follow this link, which led to a more thorough introduction of James by Benoit Tellier.

Courtesy of the Apache Software Foundation

The Mailet Container

Since last December, the James team worked hard on the subject of Mail Queue and Repositories, leading to the implementation of frequently requested features. But above all, what is a mail queue, a mail repository and the Mailet Container?

  • A mail queue, which is a mandatory component of all SMTP servers, allows the uncoupling of receiving and processing messages. In short, upon reception, mails can be channeled and temporary stored in a mail queue. Here, they can wait for further processing, hence the expression asynchronous processing.
  • A mail repository. Before an email is processed, it needs to be stored. After all, not all emails are SPAM, and some of them do contain very valuable information. For instance, in case an error is found, or a SPAM audit is needed, storage is a must have. Mail repositories serve precisely that purpose.
  • The Mailet Container is the part of James responsible for email processing. Through the Mailet Container’s configuration, one can define arbitrary logic and use custom components. During their processing, mails can be modified, destroyed, redirected and so forth.
Image for post
Courtesy of the Apache Software Foundation.

Better manage queues and repositories

In January, the team added new administration features to manage queues and repositories, two critical components related to mail processing. At the repository level, thanks to a brand new webAdmin API implemented by the team, you can now:

  • list the repositories;
  • list their content;
  • handle their content: reprocess one or several mails in the processor and queue of your choice in case they have landed in an unwanted repository, or if the process has failed in the first place, for instance due to a bug.

At the mail queue level, the James team implemented a new mail queue management API that allows you to:

  • obtain the details of a mail queue, for instance by listing the number of mails currently in queue;
  • remove some of them regarding different criteria;
  • flush delayed mails.

James’ team also improved and standardized tests for the mail queue and mail repository. Moreover, a generic test suite has been introduced, to ensure components interoperability.

Improve James distributed mode

Currently, James has an embedded non-distributed mail queue based on ActiveMQ, a component intended to change. Ideally, a distributed mail queue would be used, most notably to have a backup in case of a crash as well as to allow better load-sharing. Prior to switching to a new message broker and in order to find an appropriate solution for the James server — which would require stability and the right set of features — the team thoroughly reviewed current solutions, a process described in the article below.

After this investigation, the James team chose RabbitMQ to play the role of the new message queue, alongside with a Cassandra storage, to offer the required stability. Incidentally, RabbitMQ is also the solution OpenPaaS is currently using, which will allow further rationalization between the two software.

In parallel with the mail queue and mail repository, the team has joined the Google Summer of Code 2018. Interested to join us? You can apply below!

In the near future, an anti-SPAM solution will be implemented in James, alongside quotas and read receipts.


We hope you have enjoyed reading this newsletter on James. If there is something we can do better, do not hesitate to tell us what, for instance by sending us a direct message on Twitter.

Next month, the work and progress of another team, based in Toulouse and currently conducting research on voice recognition, will be covered. The theme could revolve around a home-brewed smart assistant currently being developed, but let’s not spoil the surprise… and see you next month!

Keep in touch with OpenPaaS on Twitter, Facebook, GitHub.
Interested in joining Linagora? We are hiring!

Going further

You are still there? Really? Please find below more resources to feed your curiosity (titles are adapted)

OpenPaaS 💌 James


How to work as a distributed team

Linagora Engineering

We are Open Source Engineers, Hacking Awesome Stuff