1CIDR_TABLE(5) File Formats Manual CIDR_TABLE(5)
2
3
4
6 cidr_table - format of Postfix CIDR tables
7
9 postmap -q "string" cidr:/etc/postfix/filename
10
11 postmap -q - cidr:/etc/postfix/filename <inputfile
12
14 The Postfix mail system uses optional lookup tables. These tables are
15 usually in dbm or db format. Alternatively, lookup tables can be spec‐
16 ified in CIDR (Classless Inter-Domain Routing) form. In this case, each
17 input is compared against a list of patterns. When a match is found,
18 the corresponding result is returned and the search is terminated.
19
20 To find out what types of lookup tables your Postfix system supports
21 use the "postconf -m" command.
22
23 To test lookup tables, use the "postmap -q" command as described in the
24 SYNOPSIS above.
25
27 The general form of a Postfix CIDR table is:
28
29 pattern result
30 When a search string matches the specified pattern, use the cor‐
31 responding result value. The pattern must be in network/prefix
32 or network_address form (see ADDRESS PATTERN SYNTAX below).
33
34 !pattern result
35 When a search string does not match the specified pattern, use
36 the specified result value. The pattern must be in network/pre‐
37 fix or network_address form (see ADDRESS PATTERN SYNTAX below).
38
39 This feature is available in Postfix 3.2 and later.
40
41 if pattern
42
43 endif When a search string matches the specified pattern, match that
44 search string against the patterns between if and endif. The
45 pattern must be in network/prefix or network_address form (see
46 ADDRESS PATTERN SYNTAX below). The if..endif can nest.
47
48 Note: do not prepend whitespace to text between if..endif.
49
50 This feature is available in Postfix 3.2 and later.
51
52 if !pattern
53
54 endif When a search string does not match the specified pattern, match
55 that search string against the patterns between if and endif.
56 The pattern must be in network/prefix or network_address form
57 (see ADDRESS PATTERN SYNTAX below). The if..endif can nest.
58
59 Note: do not prepend whitespace to text between if..endif.
60
61 This feature is available in Postfix 3.2 and later.
62
63 blank lines and comments
64 Empty lines and whitespace-only lines are ignored, as are lines
65 whose first non-whitespace character is a `#'.
66
67 multi-line text
68 A logical line starts with non-whitespace text. A line that
69 starts with whitespace continues a logical line.
70
72 Patterns are applied in the order as specified in the table, until a
73 pattern is found that matches the search string.
74
76 Postfix CIDR tables are pattern-based. A pattern is either a net‐
77 work_address which requires an exact match, or a network_address/pre‐
78 fix_length where the prefix_length part specifies the length of the
79 network_address prefix that must be matched (the other bits in the net‐
80 work_address part must be zero).
81
82 An IPv4 network address is a sequence of four decimal octets separated
83 by ".", and an IPv6 network address is a sequence of three to eight
84 he