summaryrefslogtreecommitdiff
path: root/README_IPC.md
blob: 26100d03660b1eaa7fecdb244b50fbee1fd3900a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
About the Inter Process Communication Protocol
==============================================

JWebmail needs to read a users mail box in maildir format.
JWebmail runs under its own user commonly called jwebmail.
The mailbox has rights of its own user or there is a special user for all
mailboxes under a domain. To gain access there is a setuid program called
qmail-authuser that checks acces rights and starts another program.
This program is called `extractor`.

Version 1
---------

In this version all arguments where passed by command line arguments and
json was returned.
Binary data was sent after a json header and a newline.

Version 2
---------

Here protobuf is used for message interchange.

A process in spawned for every command.
The method is given as a process argument and the arguments are a single
message on stdin which is close afterwards. The response is a single protobuf
message on stdout after which the process exits.

Version 3
---------

In this version one process is spawned for every jwebmail request.
This is done by switching to varlink a json based rpc protocol.
A small disadvantage is that all binary data needs to be base64 encoded
and passed inside of a json string.