6.1.2. Control socket

The smtpd process has a control socket as specified by environment.controlsocket.path or environment.controlsocket.port.

All connections begin with a version handshake (two bytes, ASCII char 6 and 11 for version ‘6.11’), follow by one or more request and responses. All requests are sent beginning with a command identifier (one byte, ASCII char). The command identifiers are assigned in alphabetical order. In requests with a Protobuf request body, the command identifier is followed by a binary host packed (LE) unsigned 64 bit integer telling the size of the request body.

The response begins with one byte indicating the status; + for success, or E for error. It is followed by a binary host (LE) packed unsigned 64 bit integer telling the size the response data that follows. In the success case, the data is a Protobuf response body. In the error case, it is an ASCII string.