{
    "content": [
        {
            "type": "text",
            "text": "# cidr_table (man)\n\n## NAME\n\ncidrtable - format of Postfix CIDR tables\n\n## SYNOPSIS\n\npostmap -q \"string\" cidr:/etc/postfix/filename\npostmap -q - cidr:/etc/postfix/filename <inputfile\n\n## DESCRIPTION\n\nThe  Postfix  mail system uses optional lookup tables.  These tables are usually in dbm or db\nformat.  Alternatively, lookup tables can be specified in CIDR (Classless Inter-Domain  Rout‐\ning)  form.  In this case, each input is compared against a list of patterns. When a match is\nfound, the corresponding result is returned and the search is terminated.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **TABLE FORMAT**\n- **TABLE SEARCH ORDER**\n- **ADDRESS PATTERN SYNTAX**\n- **EXAMPLE SMTPD ACCESS MAP**\n- **SEE ALSO**\n- **README FILES**\n- **HISTORY**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "cidr_table",
        "section": "",
        "mode": "man",
        "summary": "cidrtable - format of Postfix CIDR tables",
        "synopsis": "postmap -q \"string\" cidr:/etc/postfix/filename\npostmap -q - cidr:/etc/postfix/filename <inputfile",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "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"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "TABLE FORMAT",
                "lines": 42,
                "subsections": []
            },
            {
                "name": "TABLE SEARCH ORDER",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "ADDRESS PATTERN SYNTAX",
                "lines": 17,
                "subsections": []
            },
            {
                "name": "EXAMPLE SMTPD ACCESS MAP",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "README FILES",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "HISTORY",
                "lines": 23,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "cidrtable - format of Postfix CIDR tables\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "postmap -q \"string\" cidr:/etc/postfix/filename\n\npostmap -q - cidr:/etc/postfix/filename <inputfile\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The  Postfix  mail system uses optional lookup tables.  These tables are usually in dbm or db\nformat.  Alternatively, lookup tables can be specified in CIDR (Classless Inter-Domain  Rout‐\ning)  form.  In this case, each input is compared against a list of patterns. When a match is\nfound, the corresponding result is returned and the search is terminated.\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",
                "subsections": []
            },
            "TABLE FORMAT": {
                "content": "The general form of a Postfix CIDR table is:\n\npattern     result\nWhen  a  search  string  matches  the  specified pattern, use the corresponding result\nvalue. The pattern must be in network/prefix or networkaddress form (see ADDRESS PAT‐\nTERN SYNTAX below).\n\n!pattern     result\nWhen  a  search  string does not match the specified pattern, use the specified result\nvalue. The pattern must be in network/prefix or networkaddress form (see ADDRESS PAT‐\nTERN SYNTAX below).\n\nThis feature is available in Postfix 3.2 and later.\n\nif pattern\n\nendif  When  a  search string matches the specified pattern, match that search string against\nthe patterns between if and endif.  The pattern must  be  in  network/prefix  or  net‐\nworkaddress form (see ADDRESS PATTERN SYNTAX below). The if..endif can nest.\n\nNote: do not prepend whitespace to text between if..endif.\n\nThis feature is available in Postfix 3.2 and later.\n\nif !pattern\n\nendif  When  a  search  string does not match the specified pattern, match that search string\nagainst the patterns between if and endif. The pattern must be  in  network/prefix  or\nnetworkaddress form (see ADDRESS PATTERN SYNTAX below). The if..endif can nest.\n\nNote: do not prepend whitespace to text between if..endif.\n\nThis feature is available in Postfix 3.2 and later.\n\nblank lines and comments\nEmpty lines and whitespace-only lines are ignored, as are lines whose first non-white‐\nspace character is a `#'.\n\nmulti-line text\nA logical line starts with non-whitespace text. A line  that  starts  with  whitespace\ncontinues a logical line.\n",
                "subsections": []
            },
            "TABLE SEARCH ORDER": {
                "content": "Patterns  are  applied  in the order as specified in the table, until a pattern is found that\nmatches the search string.\n",
                "subsections": []
            },
            "ADDRESS PATTERN SYNTAX": {
                "content": "Postfix CIDR tables are pattern-based. A pattern is either a networkaddress  which  requires\nan exact match, or a networkaddress/prefixlength where the prefixlength part specifies the\nlength of the networkaddress prefix that must be matched (the other bits in the  networkad‐\ndress part must be zero).\n\nAn  IPv4  network  address is a sequence of four decimal octets separated by \".\", and an IPv6\nnetwork address is a sequence of three to eight hexadecimal octet pairs separated by  \":\"  or\n\"::\",  where the latter is short-hand for a sequence of one or more all-zero octet pairs. The\npattern 0.0.0.0/0 matches every IPv4 address, and ::/0 matches every IPv6 address.  IPv6 sup‐\nport is available in Postfix 2.2 and later.\n\nBefore  comparisons  are made, lookup keys and table entries are converted from string to bi‐\nnary. Therefore, IPv6 patterns will be matched regardless of leading zeros (a leading zero in\nan IPv4 address octet indicates octal notation).\n\nNote: address information may be enclosed inside \"[]\" but this form is not required.\n",
                "subsections": []
            },
            "EXAMPLE SMTPD ACCESS MAP": {
                "content": "/etc/postfix/main.cf:\nsmtpdclientrestrictions = ... cidr:/etc/postfix/client.cidr ...\n\n/etc/postfix/client.cidr:\n# Rule order matters. Put more specific allowlist entries\n# before more general denylist entries.\n192.168.1.1             OK\n192.168.0.0/16          REJECT\n2001:db8::1             OK\n2001:db8::/32           REJECT\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "postmap(1), Postfix lookup table manager\nregexptable(5), format of regular expression tables\npcretable(5), format of PCRE tables\n",
                "subsections": []
            },
            "README FILES": {
                "content": "Use \"postconf readmedirectory\" or \"postconf htmldirectory\" to locate this information.\nDATABASEREADME, Postfix lookup table overview\n",
                "subsections": []
            },
            "HISTORY": {
                "content": "CIDR table support was introduced with Postfix version 2.1.\n\nAUTHOR(S)\nThe CIDR table lookup code was originally written by:\nJozsef Kadlecsik\nKFKI Research Institute for Particle and Nuclear Physics\nPOB. 49\n1525 Budapest, Hungary\n\nAdopted and adapted by:\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\nCIDRTABLE(5)",
                "subsections": []
            }
        }
    }
}