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