#!/bin/sh # Reports parameters that exist in postconf(1) output, but that are not # documented in the postconf(5) manpage. LANG=C; export LANG LC_ALL=C; export LC_ALL bin/postconf mail_version >/dev/null || exit 1 trap 'rm -f want.tmp have.tmp stoplist.tmp 2>/dev/null' 0 1 2 3 15 # Extract parameters from the postconf(5) manpage. awk '/^%PARAM/ { print $2 }' proto/postconf.proto | sort > have.tmp || exit 1 # Build a stoplist for postconf(1) output. # Eliminate unwanted dynamic parameter names for delivery agents. These # names are prefixed by their master.cf service name (they must instead # be documented with fake names that have the "transport_" prefix; that # is implemented later in this script). for xport in error lmtp local relay retry smtp virtual do cat <stoplist.tmp # Eliminate other unwanted per-service parameters. #cat >>stoplist.tmp <>stoplist.tmp <<'EOF' lmtp_tlsrpt_enable lmtp_tlsrpt_skip_reused_handshakes lmtp_tlsrpt_socket_name EOF # Build the list of parameter names that must have an entry in the # postconf(5) manpage. ( # First, extract parameters from postconf(1) output, using the stock # configurations. bin/postconf -dHc conf | grep -F -vx -f stoplist.tmp # Next, require that all dynamically-generated parameter names for delivery # agents are documented as transport_mumble. cat <want.tmp || exit 1 # Report parameter names that have an implementation but no documentation. comm -23 want.tmp have.tmp