4
doveadm-server can be accessed via UNIX sockets or TCP protocol (by adding
5
inet_listener to doveadm service). The protocol looks like:
7
Initial handshake from client to server:
9
---%<-------------------------------------------------------------------------
10
C: VERSION doveadm-server 1 0
11
---%<-------------------------------------------------------------------------
13
Note that the spaces you see are TABs. All the fields are TAB-separated. The
14
server will send you back either:
16
* "+" means you are preauthenticated and can start sending commands. This
17
happens when connecting to the UNIX socket.
18
* "-" means you need to authenticate first.
20
The authentication is done with a regular SASL PLAIN authentication, i.e.
21
"PLAIN<tab>base64(\0user\0password)". For example for user=tss, password=secret
24
---%<-------------------------------------------------------------------------
25
C: PLAIN AHRzcwBzZWNyZXQ=
27
---%<-------------------------------------------------------------------------
29
The actual commands are in format: flags<tab>username<tab>command
30
name[<tab>parameter[<tab>parameter2...]], where the flags can be either empty,
31
"v" (verbose) or "D" (debug). Note that if the command name has spaces, they
32
are sent as spaces instead of as tabs (e.g. "quota get", not "quota<tab>get").
33
So for example to get a quota for user tss:
35
---%<-------------------------------------------------------------------------
37
S: user STORAGE 1814 - 0 user MESSAGE 6 - 0
40
---%<-------------------------------------------------------------------------
42
The storage values are all given in kilobytes.
44
The server replies using the same fields TAB-separated as what a regular
45
doveadm command sends. The reply itself ends with LF. So if the reply is large,
46
it may return a very long line as a reply. After the reply follows a status
50
* In future the "+" may be followed by more text, for now you should just
52
* "-" = failed (the error was probably logged to Dovecot's error log)
53
* "-NOUSER" = the user doesn't exist
54
* Other "-SOMETHING" errors may be added in future.
56
(This file was created from the wiki on 2013-08-05 04:42)