3.3.2 Server Settings

Server settings control how dicod is executed on the server machine.

Configuration: user string

Run with the privileges of this user. Dicod does not require root privileges, so it is recommended to always use this statement when running dicod in daemon mode. See section Daemon Operation Mode.

Example:

 
user nobody;

Configuration: group list

If user is given, dicod will drop all supplementary groups and switch to the principal group of that user. Sometimes, however, it may be necessary to retain one or more supplementary groups. For example, this might be necessary to access dictionary databases. The group statement retains the supplementary groups listed in list, e.g.:

 
user nobody;
group (man, dict);

This statement is ignored if user statement is not present or if dicod is running in inetd mode. See section Inetd Operation Mode.

Configuration: mode enum

Sets server operation mode. The argument is one of:

daemon

Run in daemon mode. See section Daemon Operation Mode, for a detailed description.

inetd

Run in inetd mode. See section Inetd Operation Mode, for a detailed description.

This statement is overridden by the ‘--inetd’ command line option. See –inetd.

Configuration: listen list;

Specify IP addresses and ports to listen on in daemon mode. By default, dicod will listen on port 2628 on all existing interfaces. Use listen statement to abridge the list of interfaces to listen on, or to change the port number.

Elements of list can have the following form:

host:port

Specifies an IPv4 socket to listen on. The host part is either a host name or an IP in “dotted-quad” form. The port part is either a numeric port number or a symbolic service name which is found in ‘/etc/services’ file.

Either of the two parts may be omitted. If host is omitted, it defaults to ‘0.0.0.0’, which means “listen on all interfaces”. If port is omitted, it defaults to 2628. In this case the colon may be omitted, too.

Examples:

 
listen localhost:2628;
listen 127.0.0.1;
listen :2628;
filename

Specifies the name of a UNIX socket to listen on.

The following statement instructs dicod to listen on the address ‘10.10.10.1’, port 2628 and on the UNIX socket ‘/var/run/dict’:

 
listen (10.10.10.1, /var/run/dict);
Configuration: pidfile string

Store PID of the master process in this file. Default is ‘localstatedir/run/dicod.pid’. Notice that the privileges of this default directory are may be insufficient for dicod to write there after switching to users privileges (see user statement). One solution to this is to create a subdirectory with the same owner as given by user statement and to point the PID file there:

 
pidfile /var/run/dict/dicod.pid;

Another solution is to make PID directory group-writable and to add the owner group to the group statement (see group statement).

Configuration: max-children number

Sets maximum number of sub-processes that can run simultaneously. This is equivalent to the number of clients that can simultaneously use the server. The default is 64 sub-processes.

Configuration: inactivity-timeout number

Set inactivity timeout to the number of seconds. The server will disconnect automatically if remote client did not send any command within this number of seconds. Setting timeout to 0 disables inactivity timeout (the default).

Using this statement along with max-children allows to control the server load.

Configuration: shutdown-timeout number

When the master server is shutting down, wait this number of seconds for all children to terminate. Default is 5 seconds.

Configuration: identity-check boolean

Enable identification check using AUTH protocol (RFC 1413). The received user name or UID can be shown in access log using %l format (see section Access Log).

Configuration: ident-keyfile string

Use encryption keys from the named file to decrypt AUTH replies encrypted using DES.

Configuration: ident-timeout number

Set timeout for AUTH input/output operation to number of seconds. Default timeout is 3 seconds.