kopano-oof(1)

NAME
kopano-oof — Control a user/store's Out Of Office settings

SYNOPSIS

kopano-oof [-Px] [-h uri] [-m {0|1}] [-n msgfile] [-s sslkeyfile] [-t subject] [-u username] [--from iso8601] [--until iso8601]

Description

This program can be used to change and/or display a user's Out Of Office ("OOF") settings. These settings control whether kopano-dagent(8) will, within a certain timeframe, send an automated reply to all incoming messages. kopano-spooler(8) can also use the OOF settings to apply special handling, such as forwarding a message to an alternate account if the original recipient has OOF active. The storage server must be running for kopano-oof to function.

After potentially updating OOF settings with -m, --from etc., kopano-oof will always output the current/new state of OOF settings in JSON format.

Options

-h uri
    Connect to the given storage server. By default, the local standard Kopano instance is contacted.

-m, --mode {0|1}
    Clears or sets the Out Of Office flag of the user store. 0 disables it, 1 enables it. When enabled, daemons like kopano-dagent(8) and kopano-spooler(8) will, when processing a message, evaluate the OOF time constraints (independently set with further options).

-n, --message file
    Update the message body for Out Of Office messages to the contents of the specified file. The encoding of the file is expected to be in the current environment's charset (LC_CTYPE variable).

-s, --sslkey-file file
    Read the specified certificate file and use it during connecting to the storage server.

-t, --subject text
    Update the subject line for Out Of Office messages to the given text. The encoding of the text is expected to be in the environment's charset.

-P  Interactively prompt for the SSL keyfile password. If neither -P nor -p are specified, kopano-oof will look for a password in the OOF_SSL_PASSWORD environment variable.

-p password
    This option is provided for compatibility with kopano-set-oof(1). You should use the OOF_SSL_PASSWORD environment variable instead to pass the SSL certificate password, because passwords may be visisble in the output of ps(1).

-u, --user username
    Edit the Out Of Office settings for the user's default store.

-x  Prompt for the user account password. If this option is not specified, kopano-oof will look for a password in the OOF_PASSWORD environment variable. If no password was specified in any way (-x, -p, environment variables), kopano-oof will log in with the "SYSTEM" account, which requires appropriate privileges. Confer with the "local_admin_users" directive in kopano-server.cfg(5).

--dump-json
    This option is ignored for compatibility with kopano-set-oof(1). JSON data is always emitted, both when the settings have changed and when they are unmodified.

--from YYYY-mm-dd HH:MM
    Limit the Out Of Office mechanism such that it is not active if the time of processing a message is before the specified timepoint. The format to use as argument is to be in the form of "2015-04-01 23:50" (ISO-8601-like). The timepoint is interpreted to be in the current environment's timezone (TZ variable).

--to YYYY-mm-dd HH:MM
    Limit the Out Of Office mechanism such that it is not active if the time of processing a message is after this timepoint. The format is the same as for --from. Alternatively, the special value "infinite" may be used to denote that OOF is open-ended.

JSON output

{
        "active" : false,
        "from" : "2019-01-01 00:00:00",
        "set" : true,
        "subject" : "outtahere",
        "until" : "infinite"
}

set represents whether the Out Of Office feature has been enabled at all. from and until specify the time range in which OOF will be considered active (if and only if it is enabled) by dagent, spooler, and so on. The special value "infinite" expresses that it is open-ended. The active flag indicates whether OOF is active right now given these conditions. subject and message contain the OOF message subject and body data.

Usage examples

Non-SSL login with password, and enabling OOF over a certain period, sourcing the body text from a file:

    OOF_PASSWORD=xfoo kopano-oof -u foo -m 1 -t "Outta here for a while" --from
    "2017-12-23 00:00" --until "2018-01-02 00:00" --message long_explanation.txt

Pseudo-disablement of one's mailbox:

    kopano-oof -u foo -m 1 -t "Dunno when I return" --from "2019-01-01 00:00"
    --until infinite

Enable out of office message of mailbox user1 with subject "test" and body from file /tmp/oof-message in a multi-server-environment:

    OOF_SSL_PASSWORD=password kopano-oof -u user1 -m 1 -t test --message
    /tmp/oof-message --host https://localhost:237/ --sslkey-file
    /etc/kopano/ssl/client.pem