Skip to content

Commit fe46eeb

Browse files
slusarzsirainen
authored andcommitted
doveadm: Add help command
1 parent bdaf9ae commit fe46eeb

File tree

3 files changed

+40
-39
lines changed

3 files changed

+40
-39
lines changed

.github/actions/spelling/expect.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ fetc
224224
fetchmail
225225
FETCHs
226226
fgrep
227-
FHIn
228227
fieldstr
229228
fileinto
230229
findtime

data/doveadm.js

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ This command cannot be used safely via API by untrusted users.`
591591
cli: 'F',
592592
optional: true,
593593
type: doveadm_arg_types.BOOL,
594-
text: `TODO (dump full and simple output and expand values).`,
594+
text: `Show the configuration in a filter-based format.`,
595595
},
596596
f: {
597597
cli: 'f',
@@ -600,12 +600,6 @@ This command cannot be used safely via API by untrusted users.`
600600
type: doveadm_arg_types.STRING,
601601
text: `Apply filters to limit output.`,
602602
},
603-
H: {
604-
cli: 'H',
605-
optional: true,
606-
type: doveadm_arg_types.BOOL,
607-
text: `TODO (verify host).`,
608-
},
609603
h: {
610604
cli: 'h',
611605
optional: true,
@@ -1401,6 +1395,20 @@ For each mailbox that has FTS data, it outputs the following key/value fields:
14011395
},
14021396
},
14031397

1398+
help: {
1399+
cli_only_cmd: true,
1400+
args: {
1401+
command: {
1402+
example: 'mailbox',
1403+
optional: true,
1404+
positional: true,
1405+
type: doveadm_arg_types.STRING,
1406+
text: `The command/group to show the man page of.`,
1407+
},
1408+
},
1409+
text: `Provide doveadm usage information.`,
1410+
},
1411+
14041412
'import': {
14051413
args: {
14061414
'source-user': {

docs/core/man/doveconf.1.md

Lines changed: 25 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ dovecotComponent: core
99
## SYNOPSIS
1010

1111
**doveconf**
12-
[**-aCdFHInPNUwx**]
12+
[**-aCdFInPNUwx**]
1313
[**-c** *config-file*]
1414
[**-f** *filter*]
1515

@@ -53,7 +53,30 @@ configuration in easy human readable output.
5353
configured.
5454

5555
**-F**
56-
: TODO (dump full and simple output and expand values).
56+
: Show the configuration in a filter-based format, which is how Dovecot
57+
internally accesses it. This can be useful for debugging why configuration
58+
is not working as expected.
59+
60+
The settings are grouped into different "structs", which are all accessed
61+
independently. A new struct is started in the output as `# struct_name`.
62+
63+
Next is the list of filters, which begin with `:FILTER` followed by the
64+
filter in the event filter syntax. An empty filter matches everything.
65+
The filters are processed from end to beginning. The settings are taken
66+
from the first matching filter (i.e. the last in the output). Since not
67+
all filters have all settings defined, the processing continues until all
68+
settings have been found.
69+
70+
Named list filter such as `protocols = imap pop3` are shown as
71+
`protocol/imap=yes` and `protocol/pop3=yes # stop list`. The "stop list"
72+
means that the value is not modified by any following filters that match.
73+
If the setting was defined as `protocols { imap=yes, pop3=yes }`, the
74+
"stop list" would be missing, because this setting is only adding the
75+
protocols, not replacing the list.
76+
77+
Settings groups are included in `:INCLUDE` lines. The includes are
78+
processed last, after all filters have been applied, so all settings inside
79+
the groups can be overridden.
5780

5881
**-f** *filter*
5982
: Show the matching configuration for the specified *filter*
@@ -83,35 +106,6 @@ configuration in easy human readable output.
83106
This matches filters which were configured like:
84107
: **remote 1.2.3.0/24 { # special settings }**
85108

86-
**-F**
87-
: Show the configuration in a filter-based format, which is how Dovecot
88-
internally accesses it. This can be useful for debugging why configuration
89-
is not working as expected.
90-
91-
The settings are grouped into different "structs", which are all accessed
92-
independently. A new struct is started in the output as `# struct_name`.
93-
94-
Next is the list of filters, which begin with `:FILTER` followed by the
95-
filter in the event filter syntax. An empty filter matches everything.
96-
The filters are processed from end to beginning. The settings are taken
97-
from the first matching filter (i.e. the last in the output). Since not
98-
all filters have all settings defined, the processing continues until all
99-
settings have been found.
100-
101-
Named list filter such as `protocols = imap pop3` are shown as
102-
`protocol/imap=yes` and `protocol/pop3=yes # stop list`. The "stop list"
103-
means that the value is not modified by any following filters that match.
104-
If the setting was defined as `protocols { imap=yes, pop3=yes }`, the
105-
"stop list" would be missing, because this setting is only adding the
106-
protocols, not replacing the list.
107-
108-
Settings groups are included in `:INCLUDE` lines. The includes are
109-
processed last, after all filters have been applied, so all settings inside
110-
the groups can be overridden.
111-
112-
**-H**
113-
: TODO (verify host).
114-
115109
**-h**
116110
: Hide the setting's name, show only the setting's value.
117111

0 commit comments

Comments
 (0)