{
    "content": [
        {
            "type": "text",
            "text": "# postmap (man)\n\n## NAME\n\npostmap - Postfix lookup table management\n\n## SYNOPSIS\n\npostmap [-bfFhimnNoprsuUvw] [-c configdir] [-d key] [-q key]\n[filetype:]filename ...\n\n## DESCRIPTION\n\nThe  postmap(1)  command  creates or queries one or more Postfix lookup tables, or updates an\nexisting one.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **INPUT FILE FORMAT**\n- **COMMAND-LINE ARGUMENTS** (19 subsections)\n- **DIAGNOSTICS** (1 subsections)\n- **ENVIRONMENT**\n- **CONFIGURATION PARAMETERS**\n- **SEE ALSO**\n- **README FILES**\n- **LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "postmap",
        "section": "",
        "mode": "man",
        "summary": "postmap - Postfix lookup table management",
        "synopsis": "postmap [-bfFhimnNoprsuUvw] [-c configdir] [-d key] [-q key]\n[filetype:]filename ...",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-q",
                "long": null,
                "arg": null,
                "description": "-\", process the input as if it is an email message in RFC 5322 format. Each line of body content becomes one lookup key. By default, the -b option starts generating lookup keys at the first non-header line, and stops when the end of the message is reached. To simulate bodychecks(5) process‐ ing, enable MIME parsing with -m. With this, the -b option generates no body-style lookup keys for attachment MIME headers and for attached message/* headers. NOTE: with \"smtputf8enable = yes\", the -b option option disables UTF-8 syntax checks on query keys and lookup results. Specify the -U option to force UTF-8 syntax checks anyway. This feature is available in Postfix version 2.6 and later."
            },
            {
                "flag": "-c",
                "long": null,
                "arg": null,
                "description": "Read the main.cf configuration file in the named directory instead of the default con‐ figuration directory."
            },
            {
                "flag": "-d",
                "long": null,
                "arg": null,
                "description": "zero when the requested information was found. If a key value of - is specified, the program reads key values from the standard input stream. The exit status is zero when at least one of the requested keys was found."
            },
            {
                "flag": "-f",
                "long": null,
                "arg": null,
                "description": "With Postfix version 2.3 and later, this option has no effect for regular expression tables. There, case folding is controlled by appending a flag to a pattern."
            },
            {
                "flag": "-F",
                "long": null,
                "arg": null,
                "description": "from source file, process each value as a list of filenames, concatenate the content of those files, and store the base64-encoded result instead of the value (see INPUT FORMAT for details)."
            },
            {
                "flag": "-h",
                "long": null,
                "arg": null,
                "description": "\"-q -\", process the input as if it is an email message in RFC 5322 format. Each logi‐ cal header line becomes one lookup key. A multi-line header becomes one lookup key with one or more embedded newline characters. By default, the -h option generates lookup keys until the first non-header line is reached. To simulate headerchecks(5) processing, enable MIME parsing with -m. With this, the -h option also generates header-style lookup keys for attachment MIME head‐ ers and for attached message/* headers. NOTE: with \"smtputf8enable = yes\", the -b option option disables UTF-8 syntax checks on query keys and lookup results. Specify the -U option to force UTF-8 syntax checks anyway. This feature is available in Postfix version 2.6 and later."
            },
            {
                "flag": "-i",
                "long": null,
                "arg": null,
                "description": "database. By default, postmap(1) creates a new database from the entries in filename."
            },
            {
                "flag": "-h",
                "long": null,
                "arg": null,
                "description": "This feature is available in Postfix version 2.6 and later."
            },
            {
                "flag": "-N",
                "long": null,
                "arg": null,
                "description": "fault, postmap(1) does whatever is the default for the host operating system."
            },
            {
                "flag": "-n",
                "long": null,
                "arg": null,
                "description": "By default, postmap(1) does whatever is the default for the host operating system."
            },
            {
                "flag": "-o",
                "long": null,
                "arg": null,
                "description": "postmap(1) drops root privileges and runs as the source file owner instead."
            },
            {
                "flag": "-p",
                "long": null,
                "arg": null,
                "description": "file. Instead, create a new file with default access permissions (mode 0644)."
            },
            {
                "flag": "-q",
                "long": null,
                "arg": null,
                "description": "put stream. The exit status is zero when the requested information was found. Note: this performs a single query with the key as specified, and does not make itera‐ tive queries with substrings of the key as described for access(5), canonical(5), transport(5), virtual(5) and other Postfix table-driven features. If a key value of - is specified, the program reads key values from the standard input stream and writes one line of key value output for each key that was found. The exit status is zero when at least one of the requested keys was found."
            },
            {
                "flag": "-r",
                "long": null,
                "arg": null,
                "description": "make those updates anyway."
            },
            {
                "flag": "-s",
                "long": null,
                "arg": null,
                "description": "ment. The elements are printed in database order, which is not necessarily the same as the original input order. This feature is available in Postfix version 2.2 and later, and is not available for all database types."
            },
            {
                "flag": "-u",
                "long": null,
                "arg": null,
                "description": "yes\". It requires that keys and values are valid UTF-8 strings."
            },
            {
                "flag": "-h",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-v",
                "long": null,
                "arg": null,
                "description": "increasingly verbose."
            },
            {
                "flag": "-w",
                "long": null,
                "arg": null,
                "description": "ignore those attempts. Arguments: filetype The database type. To find out what types are supported, use the \"postconf -m\" com‐ mand. The postmap(1) command can query any supported file type, but it can create only the following file types: btree The output file is a btree file, named filename.db. This is available on sys‐ tems with support for db databases. cdb The output consists of one file, named filename.cdb. This is available on systems with support for cdb databases. dbm The output consists of two files, named filename.pag and filename.dir. This is available on systems with support for dbm databases. fail A table that reliably fails all requests. The lookup table name is used for logging only. This table exists to simplify Postfix error tests. hash The output file is a hashed file, named filename.db. This is available on systems with support for db databases. lmdb The output is a btree-based file, named filename.lmdb. lmdb supports concur‐ rent writes and reads from different processes, unlike other supported file-based tables. This is available on systems with support for lmdb data‐ bases. sdbm The output consists of two files, named filename.pag and filename.dir. This is available on systems with support for sdbm databases. When no filetype is specified, the software uses the database type specified via the defaultdatabasetype configuration parameter. filename The name of the lookup table source file when rebuilding a database."
            },
            {
                "flag": "-q",
                "long": null,
                "arg": null,
                "description": ""
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "postalias",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/postalias/1/json"
            },
            {
                "name": "postconf",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/postconf/1/json"
            },
            {
                "name": "postconf",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/postconf/5/json"
            },
            {
                "name": "postlogd",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/postlogd/8/json"
            },
            {
                "name": "syslogd",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/syslogd/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "INPUT FILE FORMAT",
                "lines": 29,
                "subsections": []
            },
            {
                "name": "COMMAND-LINE ARGUMENTS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-b -q",
                        "lines": 14,
                        "flag": "-q"
                    },
                    {
                        "name": "-c",
                        "lines": 3,
                        "flag": "-c"
                    },
                    {
                        "name": "-d",
                        "lines": 5,
                        "flag": "-d"
                    },
                    {
                        "name": "-f",
                        "lines": 3,
                        "flag": "-f"
                    },
                    {
                        "name": "-F",
                        "lines": 4,
                        "flag": "-F"
                    },
                    {
                        "name": "-h",
                        "lines": 15,
                        "flag": "-h"
                    },
                    {
                        "name": "-i",
                        "lines": 2,
                        "flag": "-i"
                    },
                    {
                        "name": "-m -b -h",
                        "lines": 2,
                        "flag": "-h"
                    },
                    {
                        "name": "-N",
                        "lines": 2,
                        "flag": "-N"
                    },
                    {
                        "name": "-n",
                        "lines": 2,
                        "flag": "-n"
                    },
                    {
                        "name": "-o",
                        "lines": 2,
                        "flag": "-o"
                    },
                    {
                        "name": "-p",
                        "lines": 2,
                        "flag": "-p"
                    },
                    {
                        "name": "-q",
                        "lines": 10,
                        "flag": "-q"
                    },
                    {
                        "name": "-r",
                        "lines": 2,
                        "flag": "-r"
                    },
                    {
                        "name": "-s",
                        "lines": 6,
                        "flag": "-s"
                    },
                    {
                        "name": "-u",
                        "lines": 2,
                        "flag": "-u"
                    },
                    {
                        "name": "-U -b -h",
                        "lines": 1,
                        "flag": "-h"
                    },
                    {
                        "name": "-v -v",
                        "lines": 2,
                        "flag": "-v"
                    },
                    {
                        "name": "-w",
                        "lines": 40,
                        "flag": "-w"
                    }
                ]
            },
            {
                "name": "DIAGNOSTICS",
                "lines": 5,
                "subsections": [
                    {
                        "name": "-q",
                        "lines": 1,
                        "flag": "-q"
                    }
                ]
            },
            {
                "name": "ENVIRONMENT",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "CONFIGURATION PARAMETERS",
                "lines": 36,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "README FILES",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 16,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "postmap - Postfix lookup table management\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "postmap [-bfFhimnNoprsuUvw] [-c configdir] [-d key] [-q key]\n[filetype:]filename ...\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The  postmap(1)  command  creates or queries one or more Postfix lookup tables, or updates an\nexisting one.\n\nIf the result files do not exist they will be created with the same group and other read per‐\nmissions as their source file.\n\nWhile  the table update is in progress, signal delivery is postponed, and an exclusive, advi‐\nsory, lock is placed on the entire table, in order to avoid surprises in spectator processes.\n",
                "subsections": []
            },
            "INPUT FILE FORMAT": {
                "content": "The format of a lookup table input file is as follows:\n\n•      A table entry has the form\n\nkey whitespace value\n\n•      Empty lines and whitespace-only lines are ignored, as are lines whose first non-white‐\nspace character is a `#'.\n\n•      A  logical  line  starts  with non-whitespace text. A line that starts with whitespace\ncontinues a logical line.\n\nThe key and value are processed as is, except that surrounding white space is  stripped  off.\nWhitespace in lookup keys is supported as of Postfix 3.2.\n\nWhen  the -F option is given, the value must specify one or more filenames separated by comma\nand/or whitespace; postmap(1) will concatenate the file content (with a newline character in‐\nserted between files) and will store the base64-encoded result instead of the value.\n\nWhen  the key specifies email address information, the localpart should be enclosed with dou‐\nble quotes if required by RFC 5322. For example, an address localpart that contains \";\", or a\nlocalpart that starts or ends with \".\".\n\nBy  default the lookup key is mapped to lowercase to make the lookups case insensitive; as of\nPostfix 2.3 this case folding happens only with  tables  whose  lookup  keys  are  fixed-case\nstrings  such  as btree:, dbm: or hash:. With earlier versions, the lookup key is folded even\nwith tables where a lookup field can match both upper and lower case text,  such  as  regexp:\nand pcre:. This resulted in loss of information with $number substitutions.\n",
                "subsections": []
            },
            "COMMAND-LINE ARGUMENTS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-b -q",
                        "content": "-\", process the input as if it is an email message in RFC 5322 format.  Each  line  of\nbody content becomes one lookup key.\n\nBy  default, the -b option starts generating lookup keys at the first non-header line,\nand stops when the end of the message is reached.  To simulate bodychecks(5) process‐\ning,  enable  MIME  parsing  with -m. With this, the -b option generates no body-style\nlookup keys for attachment MIME headers and for attached message/* headers.\n\nNOTE: with \"smtputf8enable = yes\", the -b option option disables UTF-8 syntax  checks\non  query  keys and lookup results. Specify the -U option to force UTF-8 syntax checks\nanyway.\n\nThis feature is available in Postfix version 2.6 and later.\n",
                        "flag": "-q"
                    },
                    {
                        "name": "-c",
                        "content": "Read the main.cf configuration file in the named directory instead of the default con‐\nfiguration directory.\n",
                        "flag": "-c"
                    },
                    {
                        "name": "-d",
                        "content": "zero when the requested information was found.\n\nIf a key value of - is specified, the program reads key values from the standard input\nstream. The exit status is zero when at least one of the requested keys was found.\n",
                        "flag": "-d"
                    },
                    {
                        "name": "-f",
                        "content": "With  Postfix  version 2.3 and later, this option has no effect for regular expression\ntables. There, case folding is controlled by appending a flag to a pattern.\n",
                        "flag": "-f"
                    },
                    {
                        "name": "-F",
                        "content": "from  source  file, process each value as a list of filenames, concatenate the content\nof those files, and store the base64-encoded result instead of the  value  (see  INPUT\nFORMAT for details).\n",
                        "flag": "-F"
                    },
                    {
                        "name": "-h",
                        "content": "\"-q -\", process the input as if it is an email message in RFC 5322 format.  Each logi‐\ncal  header  line  becomes  one lookup key. A multi-line header becomes one lookup key\nwith one or more embedded newline characters.\n\nBy default, the -h option generates lookup keys until the  first  non-header  line  is\nreached.   To  simulate headerchecks(5) processing, enable MIME parsing with -m. With\nthis, the -h option also generates header-style lookup keys for attachment MIME  head‐\ners and for attached message/* headers.\n\nNOTE:  with \"smtputf8enable = yes\", the -b option option disables UTF-8 syntax checks\non query keys and lookup results. Specify the -U option to force UTF-8  syntax  checks\nanyway.\n\nThis feature is available in Postfix version 2.6 and later.\n",
                        "flag": "-h"
                    },
                    {
                        "name": "-i",
                        "content": "database. By default, postmap(1) creates a new database from the entries in filename.\n",
                        "flag": "-i"
                    },
                    {
                        "name": "-m -b -h",
                        "content": "This feature is available in Postfix version 2.6 and later.\n",
                        "flag": "-h"
                    },
                    {
                        "name": "-N",
                        "content": "fault, postmap(1) does whatever is the default for the host operating system.\n",
                        "flag": "-N"
                    },
                    {
                        "name": "-n",
                        "content": "By default, postmap(1) does whatever is the default for the host operating system.\n",
                        "flag": "-n"
                    },
                    {
                        "name": "-o",
                        "content": "postmap(1) drops root privileges and runs as the source file owner instead.\n",
                        "flag": "-o"
                    },
                    {
                        "name": "-p",
                        "content": "file.  Instead, create a new file with default access permissions (mode 0644).\n",
                        "flag": "-p"
                    },
                    {
                        "name": "-q",
                        "content": "put stream. The exit status is zero when the requested information was found.\n\nNote: this performs a single query with the key as specified, and does not make itera‐\ntive queries with substrings of the key  as  described  for  access(5),  canonical(5),\ntransport(5), virtual(5) and other Postfix table-driven features.\n\nIf a key value of - is specified, the program reads key values from the standard input\nstream and writes one line of key value output for each key that was found.  The  exit\nstatus is zero when at least one of the requested keys was found.\n",
                        "flag": "-q"
                    },
                    {
                        "name": "-r",
                        "content": "make those updates anyway.\n",
                        "flag": "-r"
                    },
                    {
                        "name": "-s",
                        "content": "ment. The elements are printed in database order, which is not necessarily the same as\nthe original input order.\n\nThis feature is available in Postfix version 2.2 and later, and is not  available  for\nall database types.\n",
                        "flag": "-s"
                    },
                    {
                        "name": "-u",
                        "content": "yes\". It requires that keys and values are valid UTF-8 strings.\n",
                        "flag": "-u"
                    },
                    {
                        "name": "-U -b -h",
                        "content": "",
                        "flag": "-h"
                    },
                    {
                        "name": "-v -v",
                        "content": "increasingly verbose.\n",
                        "flag": "-v"
                    },
                    {
                        "name": "-w",
                        "content": "ignore those attempts.\n\nArguments:\n\nfiletype\nThe database type. To find out what types are supported, use the  \"postconf  -m\"  com‐\nmand.\n\nThe  postmap(1)  command can query any supported file type, but it can create only the\nfollowing file types:\n\nbtree  The output file is a btree file, named filename.db.  This is available on sys‐\ntems with support for db databases.\n\ncdb    The  output  consists  of  one file, named filename.cdb.  This is available on\nsystems with support for cdb databases.\n\ndbm    The output consists of two files, named filename.pag and filename.dir.   This\nis available on systems with support for dbm databases.\n\nfail   A  table  that  reliably  fails all requests. The lookup table name is used for\nlogging only. This table exists to simplify Postfix error tests.\n\nhash   The output file is a hashed file, named filename.db.   This  is  available  on\nsystems with support for db databases.\n\nlmdb   The  output is a btree-based file, named filename.lmdb.  lmdb supports concur‐\nrent  writes  and  reads  from  different  processes,  unlike  other  supported\nfile-based  tables.   This  is available on systems with support for lmdb data‐\nbases.\n\nsdbm   The output consists of two files, named filename.pag and filename.dir.   This\nis available on systems with support for sdbm databases.\n\nWhen  no filetype is specified, the software uses the database type specified via the\ndefaultdatabasetype configuration parameter.\n\nfilename\nThe name of the lookup table source file when rebuilding a database.\n",
                        "flag": "-w"
                    }
                ]
            },
            "DIAGNOSTICS": {
                "content": "Problems are logged to the standard error stream and to syslogd(8) or postlogd(8).  No output\nmeans  that  no  problems were detected. Duplicate entries are skipped and are flagged with a\nwarning.\n\npostmap(1) terminates with zero exit status in case of success (including successful \"postmap",
                "subsections": [
                    {
                        "name": "-q",
                        "content": "",
                        "flag": "-q"
                    }
                ]
            },
            "ENVIRONMENT": {
                "content": "MAILCONFIG\nDirectory with Postfix configuration files.\n\nMAILVERBOSE\nEnable verbose logging for debugging purposes.\n",
                "subsections": []
            },
            "CONFIGURATION PARAMETERS": {
                "content": "The  following  main.cf  parameters  are especially relevant to this program.  The text below\nprovides only a parameter summary. See postconf(5) for more details including examples.\n\nberkeleydbcreatebuffersize (16777216)\nThe per-table I/O buffer size for programs that create Berkeley DB hash or  btree  ta‐\nbles.\n\nberkeleydbreadbuffersize (131072)\nThe per-table I/O buffer size for programs that read Berkeley DB hash or btree tables.\n\nconfigdirectory (see 'postconf -d' output)\nThe default location of the Postfix main.cf and master.cf configuration files.\n\ndefaultdatabasetype (see 'postconf -d' output)\nThe  default  database type for use in newaliases(1), postalias(1) and postmap(1) com‐\nmands.\n\nimportenvironment (see 'postconf -d' output)\nThe list of environment parameters that a privileged Postfix process will import  from\na non-Postfix parent process, or name=value environment overrides.\n\nsmtputf8enable (yes)\nEnable preliminary SMTPUTF8 support for the protocols described in RFC 6531..6533.\n\nsyslogfacility (mail)\nThe syslog facility of Postfix logging.\n\nsyslogname (see 'postconf -d' output)\nA  prefix  that is prepended to the process name in syslog records, so that, for exam‐\nple, \"smtpd\" becomes \"prefix/smtpd\".\n\nAvailable in Postfix 2.11 and later:\n\nlmdbmapsize (16777216)\nThe initial OpenLDAP LMDB database size limit in bytes.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "postalias(1), create/update/query alias database\npostconf(1), supported database types\npostconf(5), configuration parameters\npostlogd(8), Postfix logging\nsyslogd(8), system logging\n",
                "subsections": []
            },
            "README FILES": {
                "content": "Use \"postconf readmedirectory\" or \"postconf htmldirectory\" to locate this information.\nDATABASEREADME, Postfix lookup table overview\n",
                "subsections": []
            },
            "LICENSE": {
                "content": "The 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\nPOSTMAP(1)",
                "subsections": []
            }
        }
    }
}