#### 3.2.14.1 General Server Configuration ¶

Syntax:

    # Set daemon mode.
    mode ‘inetd|daemon’;

    # Run in foreground.
    foreground bool;

    # Maximum number of children processes to run simultaneously.
    max-children number;

    # Store PID of the master process in file.
    pidfile file;

    # Default port number.
    port portspec;

    # Set idle timeout.
    timeout time;

Description: These statements configure general server-related issues.

Configuration: mode string; ¶

  Set operation mode of the server. Two operation modes are supported:

  daemon ¶

    Run as a standalone daemon, disconnecting from the controlling terminal and continuing to run in the background. In this case, it is the server that controls what IP addresses and ports to listen on, who is allowed to connect and from where, how many clients are allowed to connect simultaneously, etc. Most remaining configuration statements are valid only in the daemon mode.

    This is the preferred mode of operation for GNU Mailutils servers.

  inetd ¶

    Operate as a subprocess of UNIX internet super-server program, `inetd`. See Internet super-server in inetd(8) man page, for a detailed description of the operation of `inetd` and its configuration. In this case it is `inetd` that controls all major connectivity aspects. The Mailutils server program communicates with it via standard input and output streams.

    For historical reasons, this mode is the default, if no `mode` statement is specified. This will change in the future.

Configuration: foreground bool; ¶

  [daemon mode only]
  Do not disconnect from the controlling terminal and remain in the foreground.

Configuration: max-children number; ¶

  [daemon mode only]
  Set maximum number of child processes allowed to run simultaneously. This equals the number of clients that can use the server simultaneously.

  The default is 20 clients.

Configuration: pidfile file; ¶

  After startup, store the PID of the main server process in file. When the process terminates, the file is removed. As of version 3.20, GNU Mailutils servers make no further use of this file. It is intended for use by automated startup scripts and controlling programs (e.g. see GNU pies in GNU Pies Manual).

Configuration: port portspec; ¶

  [daemon mode only]
  Set default port to listen to. The portspec argument is either a port number in decimal, or a symbolic service name, as listed in `/etc/services` (see Internet network services list in services(5) man page).

Configuration: timeout time; ¶

  Sets maximum idle time out in seconds. If a client does not send any requests during time seconds, the child process terminates.