exmdb_provider

Description

exmdb_provider is a service plugin for http(8gx). It listens on (by default) port 5000 for exmdb RPCs, a Gromox-specific protocol.

Configuration file directives

cache_interval

Default: 2 hours

listen_ip
An IPv6 address (or v4-mapped address) for exposing the timer service on.
Default: ::1
listen_port
The TCP port number for exposing the timer service on.
Default: 5000
max_ext_rule_number

Default: 20

max_router_connections

Default: unlimited

max_rpc_stub_threads

Default: unlimited

max_rule_number

Default: 1000

max_store_message_count

Default: 200000

notify_stub_threads_num

Default: 4

populating_threads_num

Default: 4

rpc_proxy_connection_num

Default: 10

separator_for_bounce

Default: ;

sqlite_mmap_size
Default: 0 (use SQLite default)
sqlite_synchronous
Enables/disables synchronous mode for SQLite databases. See https://www.sqlite.org/pragma.html#pragma_synchronous for details.
Default: off
sqlite_wal_mode
Selects the particular journal mode for SQLite databases; off selects DELETE mode, on selects WAL mode. See https://www.sqlite.org/pragma.html#pragma_journal_mode for details.
Default: on
table_size

Default: 5000

x500_org_name

Default: (unspecified)

Multiserver selection map

The SQL column users.homedir specifies a home directory location in an abstract namespace. This abstract namespace is shared between all Gromox programs, and can be used to divide users into custom subsets and steer connections to different servers.

exmdb_list.txt specifies how to map from this namespace to exmdb servers. The file is used by exmdb clients to select the right server to connect to, and the file is used by exmdb_provider to set up its own data structures.

Each line in this file consists of 4 columns separated by whitespace:

  • Initial prefix to match a user’s exmdb home directory on. The pattern should almost always end in a ‘/’ character, otherwise a prefix of “/home” is able to match a userdir of “/home2/username” as well, which may be undesired.

  • The type of mail stores that are served beneath the prefix. This must either be “private” or “public”.

  • The IPv6 (or v4-mapped) address of the midb server to use for this prefix.

  • The port number.

In the absence of exmdb_list.txt, two implicit default entries are used:

/var/lib/gromox/user/ private ::1 5000
/var/lib/gromox/domain/ public ::1 5000

Network protocol

The transmissions on the socket are simple concatenations of protocol data units built using the NDR format. The PDU length is present within the PDU itself near the start.

{
     leuint32_t length;
     char pdu[];
}
pdu := {
     uint8_t call_id;
     string directory;
     switch (call_id) {
             ...
     }
}

Files

  • config_file_path/exmdb_acl.txt: A file with one address (IPv6 or v4-mapped) per line of allowed clients. In its absence, ::1 is default-whitelisted.

  • config_file_path/exmdb_list.txt: exmdb multiserver selection map.

  • data_file_path/mail_bounce/

config_file_path and data_file_path is determined by the configuration of the program that loaded the exmdb_provider plugin.

See also

gromox(7), http(8gx)