New expansion operator: reverse_ip
[exim.git] / doc / doc-docbook / spec.xfpt
index 5cd8f1c0d527e3be766130b159eb4e47f357de1f..003ae6db83ebdbf5dda66ab5bc477de32aa6dc6f 100644 (file)
@@ -1,4 +1,4 @@
-. $Cambridge: exim/doc/doc-docbook/spec.xfpt,v 1.77 2010/06/05 11:13:29 pdp Exp $
+. $Cambridge: exim/doc/doc-docbook/spec.xfpt,v 1.79 2010/06/05 23:50:18 pdp Exp $
 .
 . /////////////////////////////////////////////////////////////////////////////
 . This is the primary source of the Exim Manual. It is an xfpt document that is
@@ -3756,7 +3756,7 @@ written to the standard output. This option can be used only by an admin user.
 .vitem &%-Mvc%&&~<&'message&~id'&>
 .oindex "&%-Mvc%&"
 .cindex "message" "listing in RFC 2822 format"
-.cindex "listing" "message in RFC 2922 format"
+.cindex "listing" "message in RFC 2822 format"
 This option causes a copy of the complete message (header lines plus body) to
 be written to the standard output in RFC 2822 format. This option can be used
 only by an admin user.
@@ -9615,6 +9615,21 @@ srandomdev() or srandom(), or a custom implementation even weaker than
 random().
 
 
+.vitem &*${reverse_ip:*&<&'ipaddr'&>&*}*&
+.cindex "expansion" "IP address"
+This operator reverses an IP address; for IPv4 addresses, the result is in
+dotted-quad decimal form, while for IPv6 addreses the result is in
+dotted-nibble hexadecimal form.  In both cases, this is the "natural" form
+for DNS.  For example,
+.code
+${reverse_ip:192.0.2.4} and ${reverse_ip:2001:0db8:c42:9:1:abcd:192.0.2.3}
+.endd
+returns
+.code
+4.2.0.192 and 3.0.2.0.0.0.0.c.d.c.b.a.1.0.0.0.9.0.0.0.2.4.c.0.8.b.d.0.1.0.0.2
+.endd
+
+
 .vitem &*${rfc2047:*&<&'string'&>&*}*&
 .cindex "expansion" "RFC 2047"
 .cindex "RFC 2047" "expansion operator"