An example of Open Source collaboration

One of the latest functionalities in **OBM** is the _provisioning module_. It makes
it easy to create, modify, and delete users, groups, etc. In order to do this,
the provisioning server has to interact with various *OBM* services (LDAP, Cyrus, etc.). Similar functionalities are available from the web interface, and use a Perl library to talk to these services. In order to bring the newfangled provisioning system closer to feature parity with the Perl component, **Linagora** started implementing the handling of autoreply messages (available from the "Mail Vacation" link in the user menu from the web interface). Autoreply messages are created by creating or updating a **SIEVE** script in the mail system. *SIEVE* is a small language, made specially for mail filtering on the server. It is described in [RFC 3028](https://www.ietf.org/rfc/rfc3028.txt)

![Mail Vacation](/sites/default/files/field/image/mailvacation.png)

In order to alter **SIEVE** scripts, it is necessary to have a **ManageSieve** client library, which can read and write messages in the *ManageSieve* protocol (from [RFC 5804](https://tools.ietf.org/html/rfc5804)). *ManageSieve* is a simple line-oriented protocol with a small number of possible actions (such as listing scripts available for a given user on the server, uploading a script or making it active). The only Java implementation is *ManageSieveJ* by _Osric Wilkinson_ (@Moosemorals), available on [Github](https://github.com/Moosemorals/ManageSieveJ).

There were some issues with it. The first was that it was not available from the central Maven repository, which is how Java software is usually distributed. This was solved by temporarily incorporating the code in a branch of the *OBM* codebase. Further testing revealed some missing functionalities, such as:
- it was not possible to login on behalf on another user (*OBM* needs to login as a system user, but on behalf of a normal user, in order to modify this user's *SIEVE* scripts)
- *ManageSieveJ* was tested against the Dovecot mail server, but *OBM* relies on Cyrus, and these servers do not implement the RFC quite the same way
- there were some issues in the way *ManageSieveJ* was handing string escaping

After developing and testing solutions for these problems, a Github issue was created on the *ManageSieveJ* project, summarizing the changes and proposing to contribute them. There were two potential issues: the original *ManageSieveJ* was laid out in a Maven-compatible way (Maven, unless told otherwise, expects files to be in particular folders), and the Cyrus compatibility changes may conflict with Dovecot. Osric was extremely responsive, and suggested that different Github issues be created for the various issues. Within a week, all the changes were merged on the master branch. Osric did a great job mavenizing the project, and prepared and uploaded *ManageSieveJ* to the Maven repository.

This shows how easy it is to improve open source software. At the end of the day, *ManageSieveJ* improved and was made available for a wider audience, and OBM gained an additional functionality, without having to reinvent the wheel.

See the contribution [here](https://github.com/Moosemorals/ManageSieveJ/issues/3#issuecomment-77119603)Zoom Kobe XIII ZK13