+## ADD_HEADER(hdrs)
+##
+## An ACL action to add the given HDRS, which are a `\n'-terminated list of
+## new header lines.
+m4_define(<:ADD_HEADER:>, <:m4_dnl
+set acl_m_hdradd = ${if def:acl_m_hdradd{$acl_m_hdradd}{}}$1\n:>)
+
+## RENAME_HEADERS_ADD(list)
+##
+## Return a newline-separated list of message header additions of the form
+## X-Distorted-Renamed-HEADER: VALUE
+## for each HEADER in the LIST which appears in the current message, where
+## VALUE is the HEADER's current value.
+m4_define(<:RENAME_HEADERS_ADD:>, <:m4_dnl
+FOREACH(<:\
+ ${if def:h_$:><:1:{X-CONF_header_token-Renamed-$:><:1: $h_$:><:1:\n}}:>,
+ <:$1:>):>)
+
+## RENAME_HEADERS_REMOVE(list)
+##
+## Return the LIST, with items separated by colons.
+m4_define(<:RENAME_HEADERS_REMOVE:>, <:m4_dnl
+CLRSEP<::>FOREACH(<:SEP(:)$:><:1:>, <:$1:>):>)
+
+## WARNING_HEADER(tag, msg)
+##
+## Add a warning header to the current mesage.
+m4_define(<:WARNING_HEADER:>,
+<:add_header = X-CONF_header_token-Warning: $1 $2:>)
+
+## _LOOKUP_ARGS([if-found], [if-not-found], [default])
+##
+## Processing for lookup arguments. Use as
+##
+## ${lookup {K} ST {F} _LOOKUP_ARGS(...)}$.
+##
+## IF-FOUND defaults to `{$value}'; IF-NOT-FOUND defaults to DEFAULT, which
+## defaults to `{}'.
+m4_define(<:_LOOKUP_ARGS:>,
+ <:m4_ifelse(<:$1$2$3:>, <::>, <::>,
+ <:$1$2:>, <::>, <:{$value}$3:>,
+ <:$2:>, <::>, <:$1$3:>,
+ <:$1$2:>):>)
+
+## LOOKUP_DOMAIN(dom, [if-found], [if-not-found])
+##
+## Look up DOM in the master domains file. If it's found, put the
+## information found in `$value' and expand to IF-FOUND, which may use `KV'
+## to extract keyword values, and defaults to `$value'; otherwise, obey
+## IF-NOT-FOUND, which may be the token `fail', or replacement text in
+## braces.