1<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN" 2 "http://www.w3.org/TR/html4/loose.dtd"> 3<html> <head> 4<meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> 5<title> Postfix manual - cidr_table(5) </title> 6</head> <body> <pre> 7CIDR_TABLE(5) CIDR_TABLE(5) 8 9<b>NAME</b> 10 cidr_table - format of Postfix CIDR tables 11 12<b>SYNOPSIS</b> 13 <b>postmap -q "</b><i>string</i><b>" <a href="cidr_table.5.html">cidr</a>:/etc/postfix/</b><i>filename</i> 14 15 <b>postmap -q - <a href="cidr_table.5.html">cidr</a>:/etc/postfix/</b><i>filename</i> <<i>inputfile</i> 16 17<b>DESCRIPTION</b> 18 The Postfix mail system uses optional lookup tables. These tables are 19 usually in <b>dbm</b> or <b>db</b> format. Alternatively, lookup tables can be spec- 20 ified in CIDR (Classless Inter-Domain Routing) form. In this case, each 21 input is compared against a list of patterns. When a match is found, 22 the corresponding result is returned and the search is terminated. 23 24 To find out what types of lookup tables your Postfix system supports 25 use the "<b>postconf -m</b>" command. 26 27 To test lookup tables, use the "<b>postmap -q</b>" command as described in the 28 SYNOPSIS above. 29 30<b>TABLE FORMAT</b> 31 The general form of a Postfix CIDR table is: 32 33 <i>network</i><b>_</b><i>address</i><b>/</b><i>network</i><b>_</b><i>mask result</i> 34 When a search string matches the specified network block, use 35 the corresponding <i>result</i> value. Specify 0.0.0.0/0 to match every 36 IPv4 address, and ::/0 to match every IPv6 address. 37 38 An IPv4 network address is a sequence of four decimal octets 39 separated by ".", and an IPv6 network address is a sequence of 40 three to eight hexadecimal octet pairs separated by ":". 41 42 The <i>network</i><b>_</b><i>mask</i> is the number of high-order bits in the <i>net-</i> 43 <i>work</i><b>_</b><i>address</i> that the search string must match. 44 45 Before comparisons are made, lookup keys and table entries are 46 converted from string to binary. Therefore table entries will be 47 matched regardless of redundant zero characters. 48 49 Note: address information may be enclosed inside "[]" but this 50 form is not required. 51 52 IPv6 support is available in Postfix 2.2 and later. 53 54 <i>network</i><b>_</b><i>address result</i> 55 When a search string matches the specified network address, use 56 the corresponding <i>result</i> value. 57 58 blank lines and comments 59 Empty lines and whitespace-only lines are ignored, as are lines 60 whose first non-whitespace character is a `#'. 61 62 multi-line text 63 A logical line starts with non-whitespace text. A line that 64 starts with whitespace continues a logical line. 65 66<b>TABLE SEARCH ORDER</b> 67 Patterns are applied in the order as specified in the table, until a 68 pattern is found that matches the search string. 69 70<b>EXAMPLE SMTPD ACCESS MAP</b> 71 /etc/postfix/<a href="postconf.5.html">main.cf</a>: 72 <a href="postconf.5.html#smtpd_client_restrictions">smtpd_client_restrictions</a> = ... <a href="cidr_table.5.html">cidr</a>:/etc/postfix/client.cidr ... 73 74 /etc/postfix/client.<a href="cidr_table.5.html">cidr</a>: 75 # Rule order matters. Put more specific whitelist entries 76 # before more general blacklist entries. 77 192.168.1.1 OK 78 192.168.0.0/16 REJECT 79 80<b>SEE ALSO</b> 81 <a href="postmap.1.html">postmap(1)</a>, Postfix lookup table manager 82 <a href="regexp_table.5.html">regexp_table(5)</a>, format of regular expression tables 83 <a href="pcre_table.5.html">pcre_table(5)</a>, format of PCRE tables 84 85<b>README FILES</b> 86 <a href="DATABASE_README.html">DATABASE_README</a>, Postfix lookup table overview 87 88<b>HISTORY</b> 89 CIDR table support was introduced with Postfix version 2.1. 90 91<b>AUTHOR(S)</b> 92 The CIDR table lookup code was originally written by: 93 Jozsef Kadlecsik 94 KFKI Research Institute for Particle and Nuclear Physics 95 POB. 49 96 1525 Budapest, Hungary 97 98 Adopted and adapted by: 99 Wietse Venema 100 IBM T.J. Watson Research 101 P.O. Box 704 102 Yorktown Heights, NY 10598, USA 103 104 CIDR_TABLE(5) 105</pre> </body> </html> 106