summaryrefslogtreecommitdiffstats
path: root/mantools/check-postlink
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:18:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:18:56 +0000
commitb7c15c31519dc44c1f691e0466badd556ffe9423 (patch)
treef944572f288bab482a615e09af627d9a2b6727d8 /mantools/check-postlink
parentInitial commit. (diff)
downloadpostfix-b7c15c31519dc44c1f691e0466badd556ffe9423.tar.xz
postfix-b7c15c31519dc44c1f691e0466badd556ffe9423.zip
Adding upstream version 3.7.10.upstream/3.7.10upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mantools/check-postlink')
-rwxr-xr-xmantools/check-postlink57
1 files changed, 57 insertions, 0 deletions
diff --git a/mantools/check-postlink b/mantools/check-postlink
new file mode 100755
index 0000000..21472d6
--- /dev/null
+++ b/mantools/check-postlink
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+# Reports parameter names that have no postlink rules.
+
+LANG=C; export LANG
+LC_ALL=C; export LC_ALL
+
+trap 'rm -f postlink.tmp postconf.tmp stoplist.tmp 2>/dev/null' 0 1 2 3 15
+
+# Extract parameters from postlink script. This also produces names
+# of obsolete parameters, and non-parameter names such as SMTPD
+# access restrictions and mask names.
+
+sed -n '/[ ].*href="postconf\.5\.html#/{
+ s/^[^#]*#//
+ s/".*//
+ p
+}' mantools/postlink | sort > postlink.tmp
+
+# Extract parameters from postconf output, using the stock configurations.
+
+bin/postconf -dHc conf | sort >postconf.tmp
+
+# Filter the postconf output through a stoplist. First, parameter
+# names prefixed by their service name.
+
+for xport in error lmtp local relay retry smtp virtual
+do
+ cat <<EOF
+${xport}_delivery_slot_cost
+${xport}_delivery_slot_discount
+${xport}_delivery_slot_loan
+${xport}_destination_concurrency_failed_cohort_limit
+${xport}_destination_concurrency_limit
+${xport}_destination_concurrency_negative_feedback
+${xport}_destination_concurrency_positive_feedback
+${xport}_destination_rate_delay
+${xport}_destination_recipient_limit
+${xport}_extra_recipient_limit
+${xport}_initial_destination_concurrency
+${xport}_minimum_delivery_slots
+${xport}_recipient_limit
+${xport}_recipient_refill_delay
+${xport}_recipient_refill_limit
+${xport}_transport_rate_delay
+EOF
+done >stoplist.tmp
+
+# Second, pseudo parameters, read-only parameters, etc.
+
+cat >>stoplist.tmp <<'EOF'
+stress
+EOF
+
+# Report names from postconf that have no rule in mantools/postlink.
+
+comm -23 postconf.tmp postlink.tmp | fgrep -vx -f stoplist.tmp