#### 5.8.4 environment ¶

The ‘`environment`’ extension complies with RFC 5183. It is a built-in extension. It introduces the following test:

Test: environment `[comparator] [match-type] name(string) keys(string-list)` ¶

  The `environment` test evaluates to ‘`true`’ if the value of the environment items name matches any string from keys.

The following environment items are defined:

domain

  The primary DNS domain of the machine where the Sieve script is executing.

host

  The fully-qualified domain name of the host where the Sieve script is executing.

location

  Type of service that is evaluating the script. Depending on the utility that is evaluating the script it is:

  Utility | Location
  --- | ---
  sieve | ‘`"MUA"`’, or set with the `--environment` option.
  maidag | ‘`"MDA"`’
  inc | ‘`"MUA"`’

name

  The string ‘`GNU Mailutils`’

phase

  The point relative to final delivery where the Sieve script is being evaluated. Depending on the utility that is evaluating the script it is:

  Utility | Location
  --- | ---
  sieve | ‘`post`’ unless set with the `--environment` option.
  mda | ‘`"during"`’
  inc | ‘`"post"`’

version

  Mailutils version string (e.g. ‘`3.20`’).