autoupdate
[postfix-master.git] / postfix-master / cidr_table.5.html
blob09689d910f9f53aeb6dbedc10587e6e4ef64df67
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>
7 CIDR_TABLE(5) CIDR_TABLE(5)
9 <b>NAME</b>
10 cidr_table - format of Postfix CIDR tables
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>
15 <b>postmap -q - <a href="cidr_table.5.html">cidr</a>:/etc/postfix/</b><i>filename</i> &lt;<i>inputfile</i>
17 <b>DESCRIPTION</b>
18 The Postfix mail system uses optional lookup tables.
19 These tables are usually in <b>dbm</b> or <b>db</b> format. Alterna-
20 tively, lookup tables can be specified in CIDR (Classless
21 Inter-Domain Routing) form. In this case, each input is
22 compared against a list of patterns. When a match is
23 found, the corresponding result is returned and the search
24 is terminated.
26 To find out what types of lookup tables your Postfix sys-
27 tem supports use the "<b>postconf -m</b>" command.
29 To test lookup tables, use the "<b>postmap -q</b>" command as
30 described in the SYNOPSIS above.
32 <b>TABLE FORMAT</b>
33 The general form of a Postfix CIDR table is:
35 <i>network</i><b>_</b><i>address</i><b>/</b><i>network</i><b>_</b><i>mask result</i>
36 When a search string matches the specified network
37 block, use the corresponding <i>result</i> value. Specify
38 0.0.0.0/0 to match every IPv4 address, and ::/0 to
39 match every IPv6 address.
41 An IPv4 network address is a sequence of four deci-
42 mal octets separated by ".", and an IPv6 network
43 address is a sequence of three to eight hexadecimal
44 octet pairs separated by ":".
46 Before comparisons are made, lookup keys and table
47 entries are converted from string to binary. There-
48 fore table entries will be matched regardless of
49 redundant zero characters.
51 Note: address information may be enclosed inside
52 "[]" but this form is not required.
54 IPv6 support is available in Postfix 2.2 and later.
56 <i>network</i><b>_</b><i>address result</i>
57 When a search string matches the specified network
58 address, use the corresponding <i>result</i> value.
60 blank lines and comments
61 Empty lines and whitespace-only lines are ignored,
62 as are lines whose first non-whitespace character
63 is a `#'.
65 multi-line text
66 A logical line starts with non-whitespace text. A
67 line that starts with whitespace continues a logi-
68 cal line.
70 <b>TABLE SEARCH ORDER</b>
71 Patterns are applied in the order as specified in the ta-
72 ble, until a pattern is found that matches the search
73 string.
75 <b>EXAMPLE SMTPD ACCESS MAP</b>
76 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
77 <a href="postconf.5.html#smtpd_client_restrictions">smtpd_client_restrictions</a> = ... <a href="cidr_table.5.html">cidr</a>:/etc/postfix/client.cidr ...
79 /etc/postfix/client.<a href="cidr_table.5.html">cidr</a>:
80 # Rule order matters. Put more specific whitelist entries
81 # before more general blacklist entries.
82 192.168.1.1 OK
83 192.168.0.0/16 REJECT
85 <b>SEE ALSO</b>
86 <a href="postmap.1.html">postmap(1)</a>, Postfix lookup table manager
87 <a href="regexp_table.5.html">regexp_table(5)</a>, format of regular expression tables
88 <a href="pcre_table.5.html">pcre_table(5)</a>, format of PCRE tables
90 <b>README FILES</b>
91 <a href="DATABASE_README.html">DATABASE_README</a>, Postfix lookup table overview
93 <b>HISTORY</b>
94 CIDR table support was introduced with Postfix version 2.1.
96 <b>AUTHOR(S)</b>
97 The CIDR table lookup code was originally written by:
98 Jozsef Kadlecsik
99 KFKI Research Institute for Particle and Nuclear Physics
100 POB. 49
101 1525 Budapest, Hungary
103 Adopted and adapted by:
104 Wietse Venema
105 IBM T.J. Watson Research
106 P.O. Box 704
107 Yorktown Heights, NY 10598, USA
109 CIDR_TABLE(5)
110 </pre> </body> </html>