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