12 my $types = PMG
::Config
::Base-
>lookup_types;
14 my $single_section = shift;
27 rejectunknownsender
=> 1,
39 conn_count_limit
=> 1,
41 message_rate_limit
=> 1,
43 before_queue_filtering
=> 1,
46 'filter-timeout' => 1,
72 dkim_sign_all_mail
=> 1,
73 'dkim-use-domain' => 1,
78 # verify if we document all mail settings
79 my $plugin = PMG
::Config
::Base-
>lookup('mail');
80 my $schema = $plugin->updateSchema(1);
81 my $properties = $schema->{properties
};
83 my $found_mail_keys = {};
84 foreach my $group (keys %$key_groups) {
85 my ($sec, $hash) = @{$key_groups->{$group}};
86 next if $sec ne 'mail';
87 foreach my $k (keys %$hash) {
88 if (!defined($properties->{$k})) {
89 warn "\n WARNING: unknown key '$k'";
92 $found_mail_keys->{$k} = 1;
95 foreach my $k (keys %$properties) {
96 next if $skiped_keys->{$k};
97 next if $k =~ m/^max_(filters|policy|smtpd_in|smtpd_out)$/;
99 if (!defined($found_mail_keys->{$k})) {
100 die "undocumented key '$k'" if !$ENV{PMG_DOCS_IGNORE_MISSING_KEY
};
101 warn "WARNING: undocumented key '$k'\n";
109 if ($single_section) {
110 if (my $a = $key_groups->{$single_section}) {
111 my ($sec, $hash) = @$a;
112 $single_section = $sec;
113 $select_keys = $hash;
118 foreach my $section (@$types) {
119 my $plugin = PMG
::Config
::Base-
>lookup($section);
120 my $schema = $plugin->updateSchema(1);
121 my $properties = $schema->{properties
};
123 if (defined($single_section)) {
124 next if $section ne $single_section;
126 print ".Section '$section'\n\n";
132 my ($key, $phash) = @_;
133 return 1 if $skiped_keys->{$key};
134 return 1 if $select_keys && !$select_keys->{$key};
138 print PVE
::RESTHandler
::dump_properties
(
139 $properties, 'asciidoc', 'config', $filter);
142 if (defined($single_section)) {
143 die "no such section '$single_section'" if !$found;