X-Git-Url: https://git.proxmox.com/?p=pmg-docs.git;a=blobdiff_plain;f=gen-pmg.conf.5-opts.pl;h=f689ec001ad0bdd3d2525eacfeec5ad10446bf5b;hp=5ee41080aec6d2810fce3b04717196cff3c2f36f;hb=HEAD;hpb=f7bc142000aae724d580cee879aafa2a4f33aef2 diff --git a/gen-pmg.conf.5-opts.pl b/gen-pmg.conf.5-opts.pl index 5ee4108..6f16e71 100755 --- a/gen-pmg.conf.5-opts.pl +++ b/gen-pmg.conf.5-opts.pl @@ -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, @@ -37,6 +40,10 @@ my $key_groups = { conn_rate_limit => 1, message_rate_limit => 1, banner => 1, + before_queue_filtering => 1, + ndr_on_block => 1, + smtputf8 => 1, + 'filter-timeout' => 1, }], 'mail-tls' => [ 'mail' , { @@ -54,7 +61,16 @@ my $key_groups = { relay => 1, relaynomx => 1, relayport => 1, + relayprotocol => 1, smarthost => 1, + smarthostport => 1, + }], + 'admin-dkim' => [ + 'admin' , { + dkim_selector => 1, + dkim_sign => 1, + dkim_sign_all_mail => 1, + 'dkim-use-domain' => 1, }], }; @@ -69,14 +85,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"; + } } } @@ -111,7 +134,7 @@ foreach my $section (@$types) { return 1 if $select_keys && !$select_keys->{$key}; return 0; }; - + print PVE::RESTHandler::dump_properties( $properties, 'asciidoc', 'config', $filter); } @@ -119,5 +142,5 @@ foreach my $section (@$types) { if (defined($single_section)) { die "no such section '$single_section'" if !$found; } - + exit(0);