1 #!/bin/sh 2 3 # Reports parameters that exist in postconf(1) output, but that are not 4 # documented in the postconf(5) manpage. 5 6 LANG=C; export LANG 7 LC_ALL=C; export LC_ALL 8 9 bin/postconf mail_version >/dev/null || exit 1 10 11 trap 'rm -f want.tmp have.tmp stoplist.tmp 2>/dev/null' 0 1 2 3 15 12 13 # Extract parameters from the postconf(5) manpage. 14 15 awk '/^%PARAM/ { print $2 }' proto/postconf.proto | sort > have.tmp || exit 1 16 17 # Build a stoplist for postconf(1) output. 18 19 # Eliminate unwanted dynamic parameter names for delivery agents. These 20 # names are prefixed by their master.cf service name (they must instead 21 # be documented with fake names that have the "transport_" prefix; that 22 # is implemented later in this script). 23 24 for xport in error lmtp local relay retry smtp virtual 25 do 26 cat <<EOF 27 ${xport}_delivery_slot_cost 28 ${xport}_delivery_slot_discount 29 ${xport}_delivery_slot_loan 30 ${xport}_destination_concurrency_failed_cohort_limit 31 ${xport}_destination_concurrency_limit 32 ${xport}_destination_concurrency_negative_feedback 33 ${xport}_destination_concurrency_positive_feedback 34 ${xport}_destination_rate_delay 35 ${xport}_destination_recipient_limit 36 ${xport}_extra_recipient_limit 37 ${xport}_initial_destination_concurrency 38 ${xport}_minimum_delivery_slots 39 ${xport}_recipient_limit 40 ${xport}_recipient_refill_delay 41 ${xport}_recipient_refill_limit 42 ${xport}_transport_rate_delay 43 EOF 44 done >stoplist.tmp 45 46 # Eliminate other unwanted per-service parameters. 47 48 #cat >>stoplist.tmp <<EOF 49 #EOF 50 51 # Eliminate unwanted auto-generated parameters that make no sense. 52 53 cat >>stoplist.tmp <<'EOF' 54 lmtp_tlsrpt_enable 55 lmtp_tlsrpt_skip_reused_handshakes 56 lmtp_tlsrpt_socket_name 57 EOF 58 59 # Build the list of parameter names that must have an entry in the 60 # postconf(5) manpage. 61 62 ( 63 # First, extract parameters from postconf(1) output, using the stock 64 # configurations. 65 66 bin/postconf -dHc conf | grep -F -vx -f stoplist.tmp 67 68 # Next, require that all dynamically-generated parameter names for delivery 69 # agents are documented as transport_mumble. 70 71 cat <<EOF 72 transport_delivery_slot_cost 73 transport_delivery_slot_discount 74 transport_delivery_slot_loan 75 transport_destination_concurrency_failed_cohort_limit 76 transport_destination_concurrency_limit 77 transport_destination_concurrency_negative_feedback 78 transport_destination_concurrency_positive_feedback 79 transport_destination_rate_delay 80 transport_destination_recipient_limit 81 transport_extra_recipient_limit 82 transport_initial_destination_concurrency 83 transport_minimum_delivery_slots 84 transport_recipient_limit 85 transport_recipient_refill_delay 86 transport_recipient_refill_limit 87 transport_transport_rate_delay 88 EOF 89 90 # Require that other per-service parameters are documented. 91 92 cat <<EOF 93 transport_time_limit 94 EOF 95 ) | sort >want.tmp || exit 1 96 97 # Report parameter names that have an implementation but no documentation. 98 99 comm -23 want.tmp have.tmp 100