Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,6 @@ OIDC
olc
oldkey
oldpassword
oldpath
oldstats
onelevel
onerr
Expand Down Expand Up @@ -882,6 +881,7 @@ usermask
usernames
userok
uuuuuu
Uwx
vacationcheck
valgrind
Valgrinding
Expand Down
128 changes: 128 additions & 0 deletions data/doveadm.js
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,120 @@ The synchronized destination. See [[man,doveadm-sync]] for options.`
text: `Connects to a compression-enabled IMAP service.`
},

config: {
cli_only_cmd: true,
args: {
a: {
cli: 'a',
optional: true,
type: doveadm_arg_types.BOOL,
text: `Show all settings.`,
},
C: {
cli: 'C',
optional: true,
type: doveadm_arg_types.BOOL,
text: `TODO (check full config).`,
},
c: {
cli: 'c',
example: '/etc/dovecot/dovecot.conf',
optional: true,
type: doveadm_arg_types.STRING,
text: `Read configuration from this file.`,
},
d: {
cli: 'd',
optional: true,
type: doveadm_arg_types.BOOL,
text: `Show setting's default value.`,
},
F: {
cli: 'F',
optional: true,
type: doveadm_arg_types.BOOL,
text: `Show the configuration in a filter-based format.`,
},
f: {
cli: 'f',
example: 'protocol=imap',
optional: true,
type: doveadm_arg_types.STRING,
text: `Apply filters to limit output.`,
},
h: {
cli: 'h',
optional: true,
type: doveadm_arg_types.BOOL,
text: `Hide the setting's name.`,
},
I: {
cli: 'I',
optional: true,
type: doveadm_arg_types.BOOL,
text: `TODO (dump config import).`,
},
N: {
cli: 'N',
optional: true,
type: doveadm_arg_types.BOOL,
text: `Show settings with non-default values and explicitly set default values.`,
},
n: {
cli: 'n',
optional: true,
type: doveadm_arg_types.BOOL,
text: `Show only settings with non-default values.`,
},
P: {
cli: 'P',
optional: true,
type: doveadm_arg_types.BOOL,
text: `Show passwords and other sensitive values.`,
},
s: {
cli: 's',
optional: true,
type: doveadm_arg_types.BOOL,
text: `Show hidden settings.`,
},
U: {
cli: 'U',
optional: true,
type: doveadm_arg_types.BOOL,
text: `Ignore unknown settings.`,
},
w: {
cli: 'w',
optional: true,
type: doveadm_arg_types.BOOL,
text: `TODO (hide obsolete warnings).`,
},
x: {
cli: 'x',
optional: true,
type: doveadm_arg_types.BOOL,
text: `Expand variables and show file contents.`,
},
'section_name': {
example: 'namespace',
optional: true,
positional: true,
type: doveadm_arg_types.STRING,
text: `Show only the configuration of these section names.`,
},
'setting_name': {
example: 'mailbox',
optional: true,
positional: true,
type: doveadm_arg_types.STRING,
text: `Show only the configuration of these setting names.`,
}
},
man: 'doveconf',
text: `Read and parse Dovecot's configuration files.`
},

copy: {
args: {
'destination-mailbox': {
Expand Down Expand Up @@ -1278,6 +1392,20 @@ For each mailbox that has FTS data, it outputs the following key/value fields:
},
},

help: {
cli_only_cmd: true,
args: {
command: {
example: 'mailbox',
optional: true,
positional: true,
type: doveadm_arg_types.STRING,
text: `The command/group to show the man page of.`,
},
},
text: `Provide doveadm usage information.`,
},

'import': {
args: {
'source-user': {
Expand Down
78 changes: 40 additions & 38 deletions docs/core/man/doveconf.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dovecotComponent: core
## SYNOPSIS

**doveconf**
[**-adnPNUx**]
[**-aCdFInPNUwx**]
[**-c** *config-file*]
[**-f** *filter*]

Expand Down Expand Up @@ -41,6 +41,9 @@ configuration in easy human readable output.
**-a**
: Show all settings with their currently configured values.

**-C**
: TODO (check full config).

**-c** *config-file*
: Read configuration from the given *config-file*. By default
*/etc/dovecot/dovecot.conf* will be used.
Expand All @@ -49,6 +52,32 @@ configuration in easy human readable output.
: Show the setting's default value instead of the one currently
configured.

**-F**
: Show the configuration in a filter-based format, which is how Dovecot
internally accesses it. This can be useful for debugging why configuration
is not working as expected.

The settings are grouped into different "structs", which are all accessed
independently. A new struct is started in the output as `# struct_name`.

Next is the list of filters, which begin with `:FILTER` followed by the
filter in the event filter syntax. An empty filter matches everything.
The filters are processed from end to beginning. The settings are taken
from the first matching filter (i.e. the last in the output). Since not
all filters have all settings defined, the processing continues until all
settings have been found.

Named list filter such as `protocols = imap pop3` are shown as
`protocol/imap=yes` and `protocol/pop3=yes # stop list`. The "stop list"
means that the value is not modified by any following filters that match.
If the setting was defined as `protocols { imap=yes, pop3=yes }`, the
"stop list" would be missing, because this setting is only adding the
protocols, not replacing the list.

Settings groups are included in `:INCLUDE` lines. The includes are
processed last, after all filters have been applied, so all settings inside
the groups can be overridden.

**-f** *filter*
: Show the matching configuration for the specified *filter*
condition. The *filter* option string has to be given as
Expand Down Expand Up @@ -77,35 +106,12 @@ configuration in easy human readable output.
This matches filters which were configured like:
: **remote 1.2.3.0/24 { # special settings }**

**-F**
: Show the configuration in a filter-based format, which is how Dovecot
internally accesses it. This can be useful for debugging why configuration
is not working as expected.

The settings are grouped into different "structs", which are all accessed
independently. A new struct is started in the output as `# struct_name`.

Next is the list of filters, which begin with `:FILTER` followed by the
filter in the event filter syntax. An empty filter matches everything.
The filters are processed from end to beginning. The settings are taken
from the first matching filter (i.e. the last in the output). Since not
all filters have all settings defined, the processing continues until all
settings have been found.

Named list filter such as `protocols = imap pop3` are shown as
`protocol/imap=yes` and `protocol/pop3=yes # stop list`. The "stop list"
means that the value is not modified by any following filters that match.
If the setting was defined as `protocols { imap=yes, pop3=yes }`, the
"stop list" would be missing, because this setting is only adding the
protocols, not replacing the list.

Settings groups are included in `:INCLUDE` lines. The includes are
processed last, after all filters have been applied, so all settings inside
the groups can be overridden.

**-h**
: Hide the setting's name, show only the setting's value.

**-I**
: TODO (dump config import).

**-n**
: Show only settings with non-default values. This is the default behavior
when no other parameters are given.
Expand All @@ -123,17 +129,20 @@ configuration in easy human readable output.
**-U**
: Ignore all unknown settings in config file.

**-w**
: TODO (hide obsolete warnings).

**-x**
: Expand configuration variables (e.g. `$ENV:foo`) and show file contents
(from e.g. `ssl_server_key_password = \</etc/ssl/password.txt`).
(from e.g. `ssl_server_key_password = </etc/ssl/password.txt`).

*section_name*
: Show only the current configuration of one or more specified sections.

*setting_name*
: Show only the setting of one or more *setting_name* (s) with the
: currently configured value. You can show a setting inside a section
: using '/' as the section separator, e.g. service/imap/executable.
: Show only the setting of one or more *setting_name*(s) with the
currently configured value. You can show a setting inside a section
using `/` as the section separator, e.g. `service/imap/executable`.

## EXAMPLE

Expand All @@ -145,13 +154,6 @@ for a specific connection.
doveconf -f local=10.0.0.110 -f remote=10.11.1.2 -f protocol=pop3 -n
```

**doveconf** can be also used to convert v1.x configuration files into
v2.x format.

```sh
doveconf -n -c /oldpath/dovecot.conf > /etc/dovecot/dovecot.conf.new
```

Ask **doveconf** for a global setting:

```sh
Expand Down