Home | History | Annotate | Line # | Download | only in mantools
check-postconf-unimplemented revision 1.1.1.1.2.1
      1          1.1  christos #!/bin/sh
      2          1.1  christos 
      3          1.1  christos # Reports parameters that are documented in the postconf(5 mapage),
      4          1.1  christos # but not implemented according to postconf(1) output.
      5          1.1  christos 
      6          1.1  christos LANG=C; export LANG
      7          1.1  christos LC_ALL=C; export LC_ALL
      8          1.1  christos 
      9          1.1  christos bin/postconf mail_version >/dev/null || exit 1
     10          1.1  christos 
     11          1.1  christos trap 'rm -f have.tmp want.tmp stoplist.tmp 2>/dev/null' 0 1 2 3 15
     12          1.1  christos 
     13          1.1  christos # Extract the implemented parameter names from postconf(1) output, using
     14          1.1  christos # the stock configurations.
     15          1.1  christos 
     16          1.1  christos bin/postconf -dHc conf | sort >have.tmp || exit 1
     17          1.1  christos 
     18          1.1  christos # Build a stoplist for postconf(5) output.
     19          1.1  christos 
     20          1.1  christos # Eliminate dynamic parameter names for delivery agents. These are
     21          1.1  christos # documented as transport_mumble.
     22          1.1  christos 
     23          1.1  christos cat <<EOF >stoplist.tmp
     24          1.1  christos transport_delivery_slot_cost
     25          1.1  christos transport_delivery_slot_discount
     26          1.1  christos transport_delivery_slot_loan
     27          1.1  christos transport_destination_concurrency_failed_cohort_limit
     28          1.1  christos transport_destination_concurrency_limit
     29          1.1  christos transport_destination_concurrency_negative_feedback
     30          1.1  christos transport_destination_concurrency_positive_feedback
     31          1.1  christos transport_destination_rate_delay
     32          1.1  christos transport_destination_recipient_limit
     33          1.1  christos transport_extra_recipient_limit
     34          1.1  christos transport_initial_destination_concurrency
     35          1.1  christos transport_minimum_delivery_slots
     36          1.1  christos transport_recipient_limit
     37          1.1  christos transport_recipient_refill_delay
     38          1.1  christos transport_recipient_refill_limit
     39          1.1  christos transport_transport_rate_delay
     40          1.1  christos EOF
     41          1.1  christos 
     42          1.1  christos # Eliminate other per-service transport_mumble parameters.
     43          1.1  christos 
     44          1.1  christos cat <<EOF >>stoplist.tmp
     45          1.1  christos transport_time_limit
     46          1.1  christos EOF
     47          1.1  christos 
     48          1.1  christos # Eliminate obsolete parameters. These are no longer implemented, but
     49          1.1  christos # still documented.
     50          1.1  christos 
     51          1.1  christos cat >>stoplist.tmp <<'EOF'
     52          1.1  christos authorized_verp_clients
     53          1.1  christos enable_errors_to
     54          1.1  christos extract_recipient_limit
     55          1.1  christos fallback_relay
     56          1.1  christos lmtp_cache_connection
     57          1.1  christos lmtp_per_record_deadline
     58          1.1  christos postscreen_blacklist_action
     59          1.1  christos postscreen_dnsbl_ttl
     60          1.1  christos postscreen_dnsbl_whitelist_threshold
     61          1.1  christos postscreen_whitelist_interfaces
     62          1.1  christos sender_based_routing
     63          1.1  christos smtp_per_record_deadline
     64          1.1  christos smtp_skip_4xx_greeting
     65          1.1  christos smtp_tls_cipherlist
     66  1.1.1.1.2.1    martin smtpd_client_connection_limit_exceptions
     67          1.1  christos smtpd_per_record_deadline
     68          1.1  christos smtpd_sasl_application_name
     69          1.1  christos smtpd_tls_cipherlist
     70          1.1  christos tls_dane_digest_agility
     71          1.1  christos tls_dane_trust_anchor_digest_enable
     72  1.1.1.1.2.1    martin tls_legacy_public_key_fingerprints
     73          1.1  christos tlsproxy_client_level
     74          1.1  christos tlsproxy_client_policy
     75          1.1  christos tlsproxy_tls_session_cache_timeout
     76          1.1  christos virtual_maps
     77          1.1  christos EOF
     78          1.1  christos 
     79  1.1.1.1.2.1    martin # Eliminate config functions. The are documented in the postconf(5)
     80  1.1.1.1.2.1    martin # manpage, but have no parameter name.
     81  1.1.1.1.2.1    martin 
     82  1.1.1.1.2.1    martin cat >>stoplist.tmp <<'EOF'
     83  1.1.1.1.2.1    martin domain_to_ascii
     84  1.1.1.1.2.1    martin domain_to_utf8
     85  1.1.1.1.2.1    martin EOF
     86  1.1.1.1.2.1    martin 
     87          1.1  christos # Extract parameters from the postconf(5) manpage.
     88          1.1  christos 
     89          1.1  christos awk '/^%PARAM/ { print $2 }' proto/postconf.proto | 
     90          1.1  christos 	grep -F -vx -f stoplist.tmp | sort > want.tmp || exit 1
     91          1.1  christos 
     92          1.1  christos # Report names from the postconf(5) manpage that have no implementation.
     93          1.1  christos 
     94          1.1  christos comm -23 want.tmp have.tmp
     95