    CIDR_TABLE(5)                                       CIDR_TABLE(5)

    NAME
           cidr_table - format of Postfix CIDR tables

    SYNOPSIS
           postmap -q "string" cidr:/usr/local/etc/postfix/filename

           postmap -q - cidr:/usr/local/etc/postfix/filename <inputfile

    DESCRIPTION
           The  Postfix  mail  system  uses  optional  access control
           tables.  These tables are usually in  dbm  or  db  format.
           Alternatively,  access  control tables can be specified in
           CIDR form.

           To find out what types of lookup tables your Postfix  sys-
           tem supports use the postconf -m command.

           To   test  lookup  tables,  use  the  postmap  command  as
           described in the SYNOPSIS above.

    TABLE FORMAT
           The general form of a Postfix CIDR table is:

           network_address/network_mask     result
                  When a search string matches the specified  network
                  block, use the corresponding result value.

           network_address     result
                  When  a search string matches the specified network
                  address, use the corresponding result value.

           blank lines and comments
                  Empty lines and whitespace-only lines are  ignored,
                  as  are  lines whose first non-whitespace character
                  is a `#'.

           multi-line text
                  A logical line starts with non-whitespace  text.  A
                  line  that starts with whitespace continues a logi-
                  cal line.

    SEARCH ORDER
           Patterns are applied in the  order  as  specified  in  the
           table,  until  a  pattern is found that matches the search
           string.

    EXAMPLE SMTPD ACCESS MAP
           /usr/local/etc/postfix/main.cf:
               smtpd_client_restrictions = ... cidr:/usr/local/etc/postfix/client.cidr ...

           /usr/local/etc/postfix/client.cidr:
               # Rule order matters. Put more specific whitelist entries
               # before more general blacklist entries.
               192.168.1.1             OK
               192.168.0.0/16          REJECT

    SEE ALSO
           regexp_table(5) format of regular expression tables
           pcre_table(5) format of PCRE tables
           tcp_table(5) TCP client/server table lookup protocol

    AUTHOR(S)
           The CIDR table lookup code was originally written by:
           Jozsef Kadlecsik
           kadlec@blackhole.kfki.hu
           KFKI Research Institute for Particle and Nuclear Physics
           POB. 49
           1525 Budapest, Hungary

           Adopted and adapted by:
           Wietse Venema
           IBM T.J. Watson Research
           P.O. Box 704
           Yorktown Heights, NY 10598, USA

                                                        CIDR_TABLE(5)