+if (1) {
+ # verify if we document all mail settings
+ my $plugin = PMG::Config::Base->lookup('mail');
+ my $schema = $plugin->updateSchema(1);
+ my $properties = $schema->{properties};
+
+ my $found_mail_keys = {};
+ foreach my $group (keys %$key_groups) {
+ my ($sec, $hash) = @{$key_groups->{$group}};
+ next if $sec ne 'mail';
+ foreach my $k (keys %$hash) {
+ if (!defined($properties->{$k})) {
+ warn "\n WARNING: unknown key '$k'";
+ next;
+ }
+ $found_mail_keys->{$k} = 1;
+ }
+ }
+ foreach my $k (keys %$properties) {
+ next if $skiped_keys->{$k};
+ next if $k =~ m/^max_(filters|policy|smtpd_in|smtpd_out)$/;
+
+ if (!defined($found_mail_keys->{$k})) {
+ die "undocumented key '$k'" if !$ENV{PMG_DOCS_IGNORE_MISSING_KEY};
+ warn "WARNING: undocumented key '$k'\n";
+ }
+ }
+}
+
+