zcore(8gx)

Name
zcore — Bridge for PHP-MAPI requests

Synopsis
zcore [-c config]

Description
zcore is a bridge process (proxy) between PHP-MAPI and the Information Store (see manpages mapi(4gx) and exmdb_provider(4gx), respectively). It listens on /run/gromox/zcore.sock (hardcoded) for zcore RPCs, a Gromox-specific protocol and issues exmdb RPCs to exmdb_provider(4gx). As exmdb_provider connections have no state to speak of, zcore is the process that defines the logins sessions. zcore needs to run on the same server as the program that uses the PHP-MAPI functions.

Options

-c config
    Read configuration directives from the given file. If this option is not specified, /etc/gromox/gromox.cfg and /etc/gromox/zcore.cfg will be read.

--version
    Output version information and exit.

-?  Display option summary.

All time-based command-line options and configuration file directives are subject to the syntax described in gromox(7), section "Duration specifications".

Configuration directives (gromox.cfg)
The following directives are recognized when reading from /etc/gromox/gromox.cfg, or when the -c option is used to specify a custom file:

daemons_fd_limit
    In gromox-zcore, this is treated as an alias for zcore_fd_limit.

outgoing_smtp_url
    See gromox.cfg(5):outgoing_smtp_url.

zcore_fd_limit
    Request that the file descriptor table be at least this large. The magic value 0 indicates that the system default hard limit (rlim_max, cf. setrlimit(2)) should be used.
    Default: 0

Configuration directives (zcore.cfg)
The following directives are recognized when reading from /etc/gromox/zcore.cfg, or when the -c option is used to specify a custom file:

address_cache_interval
    Default: 5 minutes

address_table_size
    Default: 3000

config_file_path
    Colon-separated list of directories which will be scanned when locating further configuration files, especially those used by subcomponent instances. (For example, mysql_adaptor(4gx) would be directed to look at /etc/gromox/zcore/mysql_adaptor.cfg before /etc/gromox/mysql_adaptor.cfg.)
    Default: /etc/gromox/zcore:/etc/gromox

data_file_path
    Colon-separated list of directories which will be scanned when locating data files.
    Default: /usr/share/gromox/zcore

host_id
    A unique identifier for this system. It is used for the HELO line of outgoing SMTP connections, and as an unused identifier within muidStoreWrap entryids. The identifier should only use characters allowed for hostnames.
    Default: (system hostname)

mailbox_ping_interval
    Default: 5 minutes

mail_max_length
    Default: 64M

max_ext_rule_length
    Default: 510K

max_rcpt_num
    The maximum number of recipients that an e-mail is allowed to have.
    Default: 256

rpc_proxy_connection_num
    The maximum number of (idle) connections towards Information Store homeservers that are kept alive for rapid re-use.
    Default: 10

submit_command
    Default: /usr/bin/php /usr/share/gromox/submit.php

user_cache_interval
    Sets the time how long the MAPI profile is cached before it is written to disk.
    Default: 1 hour

user_table_size
    Default: 5000

x500_org_name
    Default: (unspecified)

zcore_listen
    The named path for the AF_LOCAL socket that zcore will listen on.
    Default: /run/gromox/zcore.sock

zcore_log_file
    Target for log messages here. Special values: "-" (stderr/syslog depending on parent PID) or "syslog" are recognized.
    Default: - (auto)

zcore_log_level
    Maximum verbosity of logging. 1=crit, 2=error, 3=warn, 4=notice, 5=info, 6=debug.
    Default: 4 (notice)

zcore_max_obh_per_session
    The maximum number of object handles each session can have at any one time (e.g. folders/messages/etc. open simultaneously). Use 0 to indicate unlimited. There is one session for each time a mailbox is opened.
    Default: 500

zcore_threads_num
    The minimum number of client processing threads to keep around.
    Default: 10

zrpc_debug
    Log every incoming zcore RPC and the return code of the operation in a minimal fashion to stdout. Level 1 emits RPCs with a failure return code, level 2 emits all RPCs. Note the daemon log level needs to be "debug" (6), too.
    Default: 0

Network protocol
The transmissions on the zcore 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) {
    		...
    	}
    }

Store lookup
zcore determines the homeserver and store path for a user from the user database, which is provided by mysql_adaptor(4gx).

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

•   A portion of the store path to match on

•   The type of store ("private" or "public")

•   The IPv6 socket address of the server running exmdb_provider(4gx). The address must conform to gromox(7) § "Host addresses".

•   The TCP port number of the server

Signals
Upon receipt of SIGHUP, configuration files are re-read, but only a few select directives can be changed this way, as many parts do not implement reload.

Upon receipt of SIGHUP, the address book cache will be dropped; the next regular request for the AB will cause it to be reloaded.

Files

•   data_file_path/folder_names.txt: Translations for essential folders in a message store.

•   data_file_path/notify_bounce/: templates for read/nonread notification mails sent to originators

Notes
Behavior for the address book generally mirrors exchange_nsp(4gx), so see that manpage for additional notes.

See also
gromox(7)