]> git.proxmox.com Git - pmg-docs.git/blobdiff - gen-pmg.conf.5-opts.pl
add documentation for RAR support
[pmg-docs.git] / gen-pmg.conf.5-opts.pl
index 32370606cd61db9e47304ceb44381eaa31ac611a..23cad7c18d87166500a7c616d377b408836b956c 100755 (executable)
@@ -1,11 +1,11 @@
 #!/usr/bin/perl
 
 use lib '.';
+
 use strict;
 use warnings;
-use PVE::RESTHandler;
 
-use Data::Dumper;
+use PVE::RESTHandler;
 
 use PMG::Config;
 
@@ -30,6 +30,9 @@ my $key_groups = {
            dnsbl_threshold => 1,
            verifyreceivers => 1,
            greylist => 1,
+           greylistmask4 => 1,
+           greylist6 => 1,
+           greylistmask6 => 1,
            spf => 1,
            hide_received => 1,
            dwarning => 1,
@@ -56,7 +59,7 @@ my $key_groups = {
            relay => 1,
            relaynomx => 1,
            relayport => 1,
-               relayprotocol => 1,
+           relayprotocol => 1,
            smarthost => 1,
            smarthostport => 1,
        }],
@@ -79,14 +82,21 @@ if (1) {
        my ($sec, $hash) = @{$key_groups->{$group}};
        next if $sec ne 'mail';
        foreach my $k (keys %$hash) {
-           die "unknown key '$k'" if !defined($properties->{$k});
+           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)$/;
-       die "undocumented key '$k'" if !defined($found_mail_keys->{$k});
+
+       if (!defined($found_mail_keys->{$k})) {
+           die "undocumented key '$k'" if !$ENV{PMG_DOCS_IGNORE_MISSING_KEY};
+           warn "WARNING: undocumented key '$k'\n";
+       }
     }
 }
 
@@ -121,7 +131,7 @@ foreach my $section (@$types) {
        return 1 if $select_keys && !$select_keys->{$key};
        return 0;
     };
-    
+
     print PVE::RESTHandler::dump_properties(
        $properties, 'asciidoc', 'config', $filter);
 }
@@ -129,5 +139,5 @@ foreach my $section (@$types) {
 if (defined($single_section)) {
     die "no such section '$single_section'" if !$found;
 }
+
 exit(0);