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