xref: /netbsd-src/external/ibm-public/postfix/dist/html/tcp_table.5.html (revision 53d1339bf7f9c7367b35a9e1ebe693f9b047a47b)
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>
7TCP_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> &lt;<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       The tcp_table protocol supports only the lookup request.   The  request
38       has the following form:
39
40       <b>get</b> SPACE <i>key</i> NEWLINE
41              Look up data under the specified key.
42
43       Postfix  will  not  generate  partial  search keys such as domain names
44       without one or more subdomains, network addresses without one  or  more
45       least-significant  octets,  or  email  addresses without the localpart,
46       address extension or domain portion. This behavior is also  found  with
47       <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
49<b>REPLY FORMAT</b>
50       Each  reply specifies a status code and text. Replies must be no longer
51       than 4096 characters including the newline terminator.
52
53       <b>500</b> SPACE <i>text</i> NEWLINE
54              In case of a lookup request, the requested data does not  exist.
55              The text describes the nature of the problem.
56
57       <b>400</b> SPACE <i>text</i> NEWLINE
58              This indicates an error condition. The text describes the nature
59              of the problem. The client should retry the request later.
60
61       <b>200</b> SPACE <i>text</i> NEWLINE
62              The request was successful. In the case of a lookup request, the
63              text contains an encoded version of the requested data.
64
65<b>ENCODING</b>
66       In  request  and  reply  parameters, the character %, each non-printing
67       character, and each whitespace character must be replaced by %XX, where
68       XX is the corresponding ASCII hexadecimal character value. The hexadec-
69       imal codes can be specified in any case (upper, lower, mixed).
70
71       The Postfix client always encodes a request.  The server may  omit  the
72       encoding  as  long  as  the reply is guaranteed to not contain the % or
73       NEWLINE character.
74
75<b>SECURITY</b>
76       Do not use TCP lookup  tables  for  security  critical  purposes.   The
77       client-server connection is not protected and the server is not authen-
78       ticated.
79
80<b>BUGS</b>
81       Only the lookup method is currently implemented.
82
83       The client does not hang up when the connection  is  idle  for  a  long
84       time.
85
86<b>SEE ALSO</b>
87       <a href="postmap.1.html">postmap(1)</a>, Postfix lookup table manager
88       <a href="regexp_table.5.html">regexp_table(5)</a>, format of regular expression tables
89       <a href="pcre_table.5.html">pcre_table(5)</a>, format of PCRE tables
90       <a href="cidr_table.5.html">cidr_table(5)</a>, format of CIDR tables
91
92<b>README FILES</b>
93       <a href="DATABASE_README.html">DATABASE_README</a>, Postfix lookup table overview
94
95<b>LICENSE</b>
96       The Secure Mailer license must be distributed with this software.
97
98<b>AUTHOR(S)</b>
99       Wietse Venema
100       IBM T.J. Watson Research
101       P.O. Box 704
102       Yorktown Heights, NY 10598, USA
103
104       Wietse Venema
105       Google, Inc.
106       111 8th Avenue
107       New York, NY 10011, USA
108
109                                                                  TCP_TABLE(5)
110</pre> </body> </html>
111