{
    "content": [
        {
            "type": "text",
            "text": "# tcp_table(5) (man)\n\n**Summary:** tcptable - Postfix client/server table lookup protocol\n\n**Synopsis:** postmap -q \"string\" tcp:host:port\npostmap -q - tcp:host:port <inputfile\n\n## See Also\n\n- postmap(1)\n- regexptable(5)\n- pcretable(5)\n- cidrtable(5)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (4 lines)\n- **DESCRIPTION** (9 lines)\n- **PROTOCOL DESCRIPTION** (7 lines)\n- **REQUEST FORMAT** (10 lines)\n- **REPLY FORMAT** (15 lines)\n- **ENCODING** (7 lines)\n- **SECURITY** (3 lines)\n- **BUGS** (4 lines)\n- **SEE ALSO** (5 lines)\n- **README FILES** (3 lines)\n- **LICENSE** (16 lines)\n\n## Full Content\n\n### NAME\n\ntcptable - Postfix client/server table lookup protocol\n\n### SYNOPSIS\n\npostmap -q \"string\" tcp:host:port\n\npostmap -q - tcp:host:port <inputfile\n\n### DESCRIPTION\n\nThe Postfix mail system uses optional tables for address rewriting or mail routing. These ta‐\nbles are usually in dbm or db format. Alternatively, table lookups can be directed to  a  TCP\nserver.\n\nTo  find  out  what types of lookup tables your Postfix system supports use the \"postconf -m\"\ncommand.\n\nTo test lookup tables, use the \"postmap -q\" command as described in the SYNOPSIS above.\n\n### PROTOCOL DESCRIPTION\n\nThe TCP map class implements a very simple protocol: the client  sends  a  request,  and  the\nserver  sends  one reply. Requests and replies are sent as one line of ASCII text, terminated\nby the ASCII newline character. Request and reply parameters (see  below)  are  separated  by\nwhitespace.\n\nSend and receive operations must complete in 100 seconds.\n\n### REQUEST FORMAT\n\nThe tcptable protocol supports only the lookup request.  The request has the following form:\n\nget SPACE key NEWLINE\nLook up data under the specified key.\n\nPostfix will not generate partial search keys such as domain names without one or more subdo‐\nmains, network addresses without one or more least-significant  octets,  or  email  addresses\nwithout  the localpart, address extension or domain portion. This behavior is also found with\ncidr:, pcre:, and regexp: tables.\n\n### REPLY FORMAT\n\nEach reply specifies a status code and text. Replies must be no longer than  4096  characters\nincluding the newline terminator.\n\n500 SPACE text NEWLINE\nIn  case  of  a lookup request, the requested data does not exist.  The text describes\nthe nature of the problem.\n\n400 SPACE text NEWLINE\nThis indicates an error condition. The text describes the nature of the  problem.  The\nclient should retry the request later.\n\n200 SPACE text NEWLINE\nThe  request was successful. In the case of a lookup request, the text contains an en‐\ncoded version of the requested data.\n\n### ENCODING\n\nIn request and reply parameters, the character  %,  each  non-printing  character,  and  each\nwhitespace character must be replaced by %XX, where XX is the corresponding ASCII hexadecimal\ncharacter value. The hexadecimal codes can be specified in any case (upper, lower, mixed).\n\nThe Postfix client always encodes a request.  The server may omit the encoding as long as the\nreply is guaranteed to not contain the % or NEWLINE character.\n\n### SECURITY\n\nDo not use TCP lookup tables for security critical purposes.  The client-server connection is\nnot protected and the server is not authenticated.\n\n### BUGS\n\nOnly the lookup method is currently implemented.\n\nThe client does not hang up when the connection is idle for a long time.\n\n### SEE ALSO\n\npostmap(1), Postfix lookup table manager\nregexptable(5), format of regular expression tables\npcretable(5), format of PCRE tables\ncidrtable(5), format of CIDR tables\n\n### README FILES\n\nUse \"postconf readmedirectory\" or \"postconf htmldirectory\" to locate this information.\nDATABASEREADME, Postfix lookup table overview\n\n### LICENSE\n\nThe Secure Mailer license must be distributed with this software.\n\nAUTHOR(S)\nWietse Venema\nIBM T.J. Watson Research\nP.O. Box 704\nYorktown Heights, NY 10598, USA\n\nWietse Venema\nGoogle, Inc.\n111 8th Avenue\nNew York, NY 10011, USA\n\n\n\nTCPTABLE(5)\n\n"
        }
    ],
    "structuredContent": {
        "command": "tcp_table",
        "section": "5",
        "mode": "man",
        "summary": "tcptable - Postfix client/server table lookup protocol",
        "synopsis": "postmap -q \"string\" tcp:host:port\npostmap -q - tcp:host:port <inputfile",
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "postmap",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/postmap/1/json"
            },
            {
                "name": "regexptable",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/regexptable/5/json"
            },
            {
                "name": "pcretable",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/pcretable/5/json"
            },
            {
                "name": "cidrtable",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/cidrtable/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "PROTOCOL DESCRIPTION",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "REQUEST FORMAT",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "REPLY FORMAT",
                "lines": 15,
                "subsections": []
            },
            {
                "name": "ENCODING",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "SECURITY",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "README FILES",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 16,
                "subsections": []
            }
        ]
    }
}