tcp_table.5.html revision 1.1.1.1.16.1 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 - tcp_table(5) </title>
6 </head> <body> <pre>
7 TCP_TABLE(5) TCP_TABLE(5)
8
9 <b>NAME</b>
10 tcp_table - Postfix client/server table lookup protocol
11
12 <b>SYNOPSIS</b>
13 <b>postmap -q "</b><i>string</i><b>" <a href="tcp_table.5.html">tcp</a>:</b><i>host:port</i>
14
15 <b>postmap -q - <a href="tcp_table.5.html">tcp</a>:</b><i>host:port</i> <<i>inputfile</i>
16
17 <b>DESCRIPTION</b>
18 The Postfix mail system uses optional tables for address rewriting or
19 mail routing. These tables are usually in <b>dbm</b> or <b>db</b> format. Alterna-
20 tively, table lookups can be directed to a TCP server.
21
22 To find out what types of lookup tables your Postfix system supports
23 use the "<b>postconf -m</b>" command.
24
25 To test lookup tables, use the "<b>postmap -q</b>" command as described in the
26 SYNOPSIS above.
27
28 <b>PROTOCOL DESCRIPTION</b>
29 The TCP map class implements a very simple protocol: the client sends a
30 request, and the server sends one reply. Requests and replies are sent
31 as one line of ASCII text, terminated by the ASCII newline character.
32 Request and reply parameters (see below) are separated by whitespace.
33
34 Send and receive operations must complete in 100 seconds.
35
36 <b>REQUEST FORMAT</b>
37 Each request specifies a command, a lookup key, and possibly a lookup
38 result.
39
40 <b>get</b> SPACE <i>key</i> NEWLINE
41 Look up data under the specified key.
42
43 <b>put</b> SPACE <i>key</i> SPACE <i>value</i> NEWLINE
44 This request is currently not implemented.
45
46 <b>REPLY FORMAT</b>
47 Each reply specifies a status code and text. Replies must be no longer
48 than 4096 characters including the newline terminator.
49
50 <b>500</b> SPACE <i>text</i> NEWLINE
51 In case of a lookup request, the requested data does not exist.
52 In case of an update request, the request was rejected. The
53 text describes the nature of the problem.
54
55 <b>400</b> SPACE <i>text</i> NEWLINE
56 This indicates an error condition. The text describes the nature
57 of the problem. The client should retry the request later.
58
59 <b>200</b> SPACE <i>text</i> NEWLINE
60 The request was successful. In the case of a lookup request, the
61 text contains an encoded version of the requested data.
62
63 <b>ENCODING</b>
64 In request and reply parameters, the character %, each non-printing
65 character, and each whitespace character must be replaced by %XX, where
66 XX is the corresponding ASCII hexadecimal character value. The hexadec-
67 imal codes can be specified in any case (upper, lower, mixed).
68
69 The Postfix client always encodes a request. The server may omit the
70 encoding as long as the reply is guaranteed to not contain the % or
71 NEWLINE character.
72
73 <b>SECURITY</b>
74 Do not use TCP lookup tables for security critical purposes. The
75 client-server connection is not protected and the server is not authen-
76 ticated.
77
78 <b>BUGS</b>
79 Only the lookup method is currently implemented.
80
81 The client does not hang up when the connection is idle for a long
82 time.
83
84 <b>SEE ALSO</b>
85 <a href="postmap.1.html">postmap(1)</a>, Postfix lookup table manager
86 <a href="regexp_table.5.html">regexp_table(5)</a>, format of regular expression tables
87 <a href="pcre_table.5.html">pcre_table(5)</a>, format of PCRE tables
88 <a href="cidr_table.5.html">cidr_table(5)</a>, format of CIDR tables
89
90 <b>README FILES</b>
91 <a href="DATABASE_README.html">DATABASE_README</a>, Postfix lookup table overview
92
93 <b>LICENSE</b>
94 The Secure Mailer license must be distributed with this software.
95
96 <b>AUTHOR(S)</b>
97 Wietse Venema
98 IBM T.J. Watson Research
99 P.O. Box 704
100 Yorktown Heights, NY 10598, USA
101
102 TCP_TABLE(5)
103 </pre> </body> </html>
104