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