tcp_table revision 1.1.1.4 1 1.1 tron #++
2 1.1 tron # NAME
3 1.1 tron # tcp_table 5
4 1.1 tron # SUMMARY
5 1.1 tron # Postfix client/server table lookup protocol
6 1.1 tron # SYNOPSIS
7 1.1 tron # \fBpostmap -q "\fIstring\fB" tcp:\fIhost:port\fR
8 1.1 tron #
9 1.1.1.2 tron # \fBpostmap -q - tcp:\fIhost:port\fB <\fIinputfile\fR
10 1.1 tron # DESCRIPTION
11 1.1.1.4 christos # The Postfix mail system uses optional tables for address
12 1.1.1.4 christos # rewriting or mail routing. These tables are usually in
13 1.1.1.4 christos # \fBdbm\fR or \fBdb\fR format. Alternatively, table lookups
14 1.1.1.4 christos # can be directed to a TCP server.
15 1.1 tron #
16 1.1.1.4 christos # To find out what types of lookup tables your Postfix system
17 1.1.1.4 christos # supports use the "\fBpostconf -m\fR" command.
18 1.1 tron #
19 1.1.1.4 christos # To test lookup tables, use the "\fBpostmap -q\fR" command as
20 1.1.1.4 christos # described in the SYNOPSIS above.
21 1.1 tron # PROTOCOL DESCRIPTION
22 1.1 tron # .ad
23 1.1 tron # .fi
24 1.1 tron # The TCP map class implements a very simple protocol: the client
25 1.1 tron # sends a request, and the server sends one reply. Requests and
26 1.1 tron # replies are sent as one line of ASCII text, terminated by the
27 1.1 tron # ASCII newline character. Request and reply parameters (see below)
28 1.1 tron # are separated by whitespace.
29 1.1 tron #
30 1.1 tron # Send and receive operations must complete in 100 seconds.
31 1.1 tron # REQUEST FORMAT
32 1.1 tron # .ad
33 1.1 tron # .fi
34 1.1.1.4 christos # The tcp_table protocol supports only the lookup request.
35 1.1.1.4 christos # The request has the following form:
36 1.1 tron # .IP "\fBget\fR SPACE \fIkey\fR NEWLINE"
37 1.1 tron # Look up data under the specified key.
38 1.1.1.4 christos # .PP
39 1.1.1.4 christos # Postfix will not generate partial search keys such as domain
40 1.1.1.4 christos # names without one or more subdomains, network addresses
41 1.1.1.4 christos # without one or more least-significant octets, or email
42 1.1.1.4 christos # addresses without the localpart, address extension or domain
43 1.1.1.4 christos # portion. This behavior is also found with cidr:, pcre:, and
44 1.1.1.4 christos # regexp: tables.
45 1.1 tron # REPLY FORMAT
46 1.1 tron # .ad
47 1.1 tron # .fi
48 1.1 tron # Each reply specifies a status code and text. Replies must be no
49 1.1 tron # longer than 4096 characters including the newline terminator.
50 1.1 tron # .IP "\fB500\fR SPACE \fItext\fR NEWLINE"
51 1.1 tron # In case of a lookup request, the requested data does not exist.
52 1.1 tron # The text describes the nature of the problem.
53 1.1 tron # .IP "\fB400\fR SPACE \fItext\fR NEWLINE"
54 1.1 tron # This indicates an error condition. The text describes the nature of
55 1.1 tron # the problem. The client should retry the request later.
56 1.1 tron # .IP "\fB200\fR SPACE \fItext\fR NEWLINE"
57 1.1 tron # The request was successful. In the case of a lookup request,
58 1.1 tron # the text contains an encoded version of the requested data.
59 1.1 tron # ENCODING
60 1.1 tron # .ad
61 1.1 tron # .fi
62 1.1 tron # In request and reply parameters, the character %, each non-printing
63 1.1 tron # character, and each whitespace character must be replaced by %XX,
64 1.1 tron # where XX is the corresponding ASCII hexadecimal character value. The
65 1.1 tron # hexadecimal codes can be specified in any case (upper, lower, mixed).
66 1.1 tron #
67 1.1 tron # The Postfix client always encodes a request.
68 1.1 tron # The server may omit the encoding as long as the reply
69 1.1 tron # is guaranteed to not contain the % or NEWLINE character.
70 1.1 tron # SECURITY
71 1.1 tron # .ad
72 1.1 tron # .fi
73 1.1 tron # Do not use TCP lookup tables for security critical purposes.
74 1.1 tron # The client-server connection is not protected and the server
75 1.1 tron # is not authenticated.
76 1.1 tron # BUGS
77 1.1 tron # Only the lookup method is currently implemented.
78 1.1 tron #
79 1.1 tron # The client does not hang up when the connection is idle for
80 1.1 tron # a long time.
81 1.1 tron # SEE ALSO
82 1.1 tron # postmap(1), Postfix lookup table manager
83 1.1 tron # regexp_table(5), format of regular expression tables
84 1.1 tron # pcre_table(5), format of PCRE tables
85 1.1 tron # cidr_table(5), format of CIDR tables
86 1.1 tron # README FILES
87 1.1 tron # .ad
88 1.1 tron # .fi
89 1.1 tron # Use "\fBpostconf readme_directory\fR" or
90 1.1 tron # "\fBpostconf html_directory\fR" to locate this information.
91 1.1 tron # .na
92 1.1 tron # .nf
93 1.1 tron # DATABASE_README, Postfix lookup table overview
94 1.1 tron # LICENSE
95 1.1 tron # .ad
96 1.1 tron # .fi
97 1.1 tron # The Secure Mailer license must be distributed with this software.
98 1.1 tron # AUTHOR(S)
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.1.3 christos #
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 tron #--*/
109