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,
70 dkim_sign_all_mail
=> 1,
75 # verify if we document all mail settings
76 my $plugin = PMG
::Config
::Base-
>lookup('mail');
77 my $schema = $plugin->updateSchema(1);
78 my $properties = $schema->{properties
};
80 my $found_mail_keys = {};
81 foreach my $group (keys %$key_groups) {
82 my ($sec, $hash) = @{$key_groups->{$group}};
83 next if $sec ne 'mail';
84 foreach my $k (keys %$hash) {
85 if (!defined($properties->{$k})) {
86 warn "\n WARNING: unknown key '$k'";
89 $found_mail_keys->{$k} = 1;
92 foreach my $k (keys %$properties) {
93 next if $skiped_keys->{$k};
94 next if $k =~ m/^max_(filters|policy|smtpd_in|smtpd_out)$/;
96 if (!defined($found_mail_keys->{$k})) {
97 die "undocumented key '$k'" if !$ENV{PMG_DOCS_IGNORE_MISSING_KEY
};
98 warn "WARNING: undocumented key '$k'\n";
106 if ($single_section) {
107 if (my $a = $key_groups->{$single_section}) {
108 my ($sec, $hash) = @$a;
109 $single_section = $sec;
110 $select_keys = $hash;
115 foreach my $section (@$types) {
116 my $plugin = PMG
::Config
::Base-
>lookup($section);
117 my $schema = $plugin->updateSchema(1);
118 my $properties = $schema->{properties
};
120 if (defined($single_section)) {
121 next if $section ne $single_section;
123 print ".Section '$section'\n\n";
129 my ($key, $phash) = @_;
130 return 1 if $skiped_keys->{$key};
131 return 1 if $select_keys && !$select_keys->{$key};
135 print PVE
::RESTHandler
::dump_properties
(
136 $properties, 'asciidoc', 'config', $filter);
139 if (defined($single_section)) {
140 die "no such section '$single_section'" if !$found;