1TCP_TABLE(5)                  File Formats Manual                 TCP_TABLE(5)
2
3
4

NAME

6       tcp_table - Postfix client/server table lookup protocol
7

SYNOPSIS

9       postmap -q "string" tcp:host:port
10
11       postmap -q - tcp:host:port <inputfile
12

DESCRIPTION

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

PROTOCOL DESCRIPTION

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

REQUEST FORMAT

33       Each request specifies a command, a lookup key, and possibly  a  lookup
34       result.
35
36       get SPACE key NEWLINE
37              Look up data under the specified key.
38
39       put SPACE key SPACE value NEWLINE
40              This request is currently not implemented.
41

REPLY FORMAT

43       Each  reply specifies a status code and text. Replies must be no longer
44       than 4096 characters including the newline terminator.
45
46       500 SPACE text NEWLINE
47              In case of a lookup request, the requested data does not  exist.
48              In  case  of  an  update request, the request was rejected.  The
49              text describes the nature of the problem.
50
51       400 SPACE text NEWLINE
52              This indicates an error condition. The text describes the nature
53              of the problem. The client should retry the request later.
54
55       200 SPACE text NEWLINE
56              The request was successful. In the case of a lookup request, the
57              text contains an encoded version of the requested data.
58

ENCODING

60       In request and reply parameters, the  character  %,  each  non-printing
61       character, and each whitespace character must be replaced by %XX, where
62       XX is the corresponding ASCII hexadecimal character value. The hexadec‐
63       imal codes can be specified in any case (upper, lower, mixed).
64
65       The  Postfix  client always encodes a request.  The server may omit the
66       encoding as long as the reply is guaranteed to not  contain  the  %  or
67       NEWLINE character.
68

SECURITY

70       Do  not  use  TCP  lookup  tables  for security critical purposes.  The
71       client-server connection is not protected and the server is not authen‐
72       ticated.
73

BUGS

75       Only the lookup method is currently implemented.
76
77       The  client  does  not  hang  up when the connection is idle for a long
78       time.
79

SEE ALSO

81       postmap(1), Postfix lookup table manager
82       regexp_table(5), format of regular expression tables
83       pcre_table(5), format of PCRE tables
84       cidr_table(5), format of CIDR tables
85

README FILES

87       Use "postconf readme_directory" or "postconf html_directory" to  locate
88       this information.
89       DATABASE_README, Postfix lookup table overview
90

LICENSE

92       The Secure Mailer license must be distributed with this software.
93

AUTHOR(S)

95       Wietse Venema
96       IBM T.J. Watson Research
97       P.O. Box 704
98       Yorktown Heights, NY 10598, USA
99
100
101
102                                                                  TCP_TABLE(5)
Impressum