1TCP_TABLE(5) File Formats Manual TCP_TABLE(5)
2
3
4
6 tcp_table - Postfix client/server table lookup protocol
7
9 postmap -q "string" tcp:host:port
10
11 postmap -q - tcp:host:port <inputfile
12
14 The Postfix mail system uses optional tables for address rewriting or
15 mail routing. These tables are usually in dbm or db format. Alterna‐
16 tively, table lookups can be directed to a TCP server.
17
18 To find out what types of lookup tables your Postfix system supports
19 use the "postconf -m" command.
20
21 To test lookup tables, use the "postmap -q" command as described in the
22 SYNOPSIS above.
23
25 The TCP map class implements a very simple protocol: the client sends a
26 request, and the server sends one reply. Requests and replies are sent
27 as one line of ASCII text, terminated by the ASCII newline character.
28 Request and reply parameters (see below) are separated by whitespace.
29
30 Send and receive operations must complete in 100 seconds.
31
33 The tcp_table protocol supports only the lookup request. The request
34 has the following form:
35
36 get SPACE key NEWLINE
37 Look up data under the specified key.
38
39 Postfix will not generate partial search keys such as domain names
40 without one or more subdomains, network addresses without one or more
41 least-significant octets, or email addresses without the localpart,
42 address extension or domain portion. This behavior is also found with
43 cidr:, pcre:, and regexp: tables.
44
46 Each reply specifies a status code and text. Replies must be no longer
47 than 4096 characters including the newline terminator.
48
49 500 SPACE text NEWLINE
50 In case of a lookup request, the requested data does not exist.
51 The text describes the nature of the problem.
52
53 400 SPACE text NEWLINE
54 This indicates an error condition. The text describes the nature
55 of the problem. The client should retry the request later.
56
57 200 SPACE text NEWLINE
58 The request was successful. In the case of a lookup request, the
59 text contains an encoded version of the requested data.
60
62 In request and reply parameters, the character %, each non-printing
63 character, and each whitespace character must be replaced by %XX, where
64 XX is the corresponding ASCII hexadecimal character value. The hexadec‐
65 imal codes can be specified in any case (upper, lower, mixed).
66
67 The Postfix client always encodes a request. The server may omit the
68 encoding as long as the reply is guaranteed to not contain the % or
69 NEWLINE character.
70
72 Do not use TCP lookup tables for security critical purposes. The
73 client-server connection is not protected and the server is not authen‐
74 ticated.
75
77 Only the lookup method is currently implemented.
78
79 The client does not hang up when the connection is idle for a long
80 time.
81
83 postmap(1), Postfix lookup table manager
84 regexp_table(5), format of regular expression tables
85 pcre_table(5), format of PCRE tables
86 cidr_table(5), format of CIDR tables
87
89 Use "postconf readme_directory" or "postconf html_directory" to locate
90 this information.
91 DATABASE_README, Postfix lookup table overview
92
94 The Secure Mailer license must be distributed with this software.
95
97 Wietse Venema
98 IBM T.J. Watson Research
99 P.O. Box 704
100 Yorktown Heights, NY 10598, USA
101
102 Wietse Venema
103 Google, Inc.
104 111 8th Avenue
105 New York, NY 10011, USA
106
107
108
109 TCP_TABLE(5)