Use Soledad Server API as entry point to put incoming mail instead of directly using Soledad's Couch backend
Currently, MX uses the Soledad's CouchDatabase class to talk directly to couch. This can be a problem is Soledad Server manages resources needed to maintain database metadata integrity.
We might have to:
- Check if Soledad Server does manage specific resources to maintain database metadata (look for locks in the new transaction_log/gen_docs implementation).
- Decide whether that is indeed a problem with concurrent insertions (from MX or other components).
- Add something to Soledad API to make it possible for MX to insert incoming mail.
- Add user/pass or somehow bypass authentication so MX can operate on Soledad Server.
(from redmine: created on 2016-07-29)