{
    "content": [
        {
            "type": "text",
            "text": "# postalias(1) (man)\n\n**Summary:** postalias - Postfix alias database maintenance\n\n**Synopsis:** postalias [-Nfinoprsuvw] [-c configdir] [-d key] [-q key]\n[filetype:]filename ...\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -c | — | — | Read the main.cf configuration file in the named directory instead of the default con‐ figuration directory. |\n| -d | — | — | zero when the requested information was found. If a key value of - is specified, the program reads key values from the s |\n| -f | — | — | With Postfix version 2.3 and later, this option has no effect for regular expression tables. There, case folding is cont |\n| -i | — | — | database. By default, postalias(1) creates a new database from the entries in filename. |\n| -N | — | — | fault, postalias(1) does whatever is the default for the host operating system. |\n| -n | — | — | By default, postalias(1) does whatever is the default for the host operating system. |\n| -o | — | — | postalias(1) drops root privileges and runs as the source file owner instead. |\n| -p | — | — | file. Instead, create a new file with default access permissions (mode 0644). |\n| -q | — | — | put stream. The exit status is zero when the requested information was found. Note: this performs a single query with th |\n| -r | — | — | make those updates anyway. |\n| -s | — | — | ment. The elements are printed in database order, which is not necessarily the same as the original input order. This fe |\n| -u | — | — | yes\". It requires that keys and values are valid UTF-8 strings. |\n| -v | — | — | increasingly verbose. |\n| -w | — | — | ignore those attempts. Arguments: filetype The database type. To find out what types are supported, use the \"postconf -m |\n\n## See Also\n\n- aliases(5)\n- local(8)\n- postconf(1)\n- postconf(5)\n- postmap(1)\n- newaliases(1)\n- postlogd(8)\n- syslogd(8)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (3 lines)\n- **DESCRIPTION** (21 lines) — 14 subsections\n  - -c (3 lines)\n  - -d (5 lines)\n  - -f (3 lines)\n  - -i (3 lines)\n  - -N (2 lines)\n  - -n (2 lines)\n  - -o (2 lines)\n  - -p (2 lines)\n  - -q (9 lines)\n  - -r (2 lines)\n  - -s (4 lines)\n  - -u (2 lines)\n  - -v -v (2 lines)\n  - -w (41 lines)\n- **DIAGNOSTICS** (7 lines)\n- **ENVIRONMENT** (6 lines)\n- **CONFIGURATION PARAMETERS** (42 lines)\n- **STANDARDS** (2 lines)\n- **SEE ALSO** (9 lines)\n- **README FILES** (3 lines)\n- **LICENSE** (16 lines)\n\n## Full Content\n\n### NAME\n\npostalias - Postfix alias database maintenance\n\n### SYNOPSIS\n\npostalias [-Nfinoprsuvw] [-c configdir] [-d key] [-q key]\n[filetype:]filename ...\n\n### DESCRIPTION\n\nThe  postalias(1)  command creates or queries one or more Postfix alias databases, or updates\nan existing one. The input and output file formats are expected to be compatible  with  Send‐\nmail version 8, and are expected to be suitable for the use as NIS alias maps.\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 a database update is in progress, signal delivery is postponed, and an exclusive, advi‐\nsory,  lock  is  placed on the entire database, in order to avoid surprises in spectator pro‐\ncesses.\n\nThe format of Postfix alias input files is described in aliases(5).\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\nOptions:\n\n#### -c\n\nRead the main.cf configuration file in the named directory instead of the default con‐\nfiguration directory.\n\n#### -d\n\nzero 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\n#### -f\n\nWith  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\n#### -i\n\ndatabase.  By  default,  postalias(1)  creates  a  new  database  from  the entries in\nfilename.\n\n#### -N\n\nfault, postalias(1) does whatever is the default for the host operating system.\n\n#### -n\n\nBy default, postalias(1) does whatever is the default for the host operating system.\n\n#### -o\n\npostalias(1) drops root privileges and runs as the source file owner instead.\n\n#### -p\n\nfile.  Instead, create a new file with default access permissions (mode 0644).\n\n#### -q\n\nput 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 in the aliases(5) manual page.\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\n#### -r\n\nmake those updates anyway.\n\n#### -s\n\nment. The elements are printed in database order, which is not necessarily the same as\nthe original input order.  This feature is available in Postfix version 2.2 and later,\nand is not available for all database types.\n\n#### -u\n\nyes\". It requires that keys and values are valid UTF-8 strings.\n\n#### -v -v\n\nincreasingly verbose.\n\n#### -w\n\nignore those attempts.\n\nArguments:\n\nfiletype\nThe  database  type.  To find out what types are supported, use the \"postconf -m\" com‐\nmand.\n\nThe postalias(1) command can query any supported file type, but it can create only the\nfollowing file types:\n\nbtree  The  output  is a btree file, named filename.db.  This is available on systems\nwith support for db databases.\n\ncdb    The output is one file named filename.cdb.  This is available on systems  with\nsupport 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 is a hashed file, named filename.db.  This is available on systems\nwith 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.  The default value for this parameter\ndepends on the host environment.\n\nfilename\nThe name of the alias database source file when creating a database.\n\n### DIAGNOSTICS\n\nProblems 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\npostalias(1) terminates with zero exit  status  in  case  of  success  (including  successful\n\"postalias -q\" lookup) and terminates with non-zero exit status in case of failure.\n\n### ENVIRONMENT\n\nMAILCONFIG\nDirectory with Postfix configuration files.\n\nMAILVERBOSE\nEnable verbose logging for debugging purposes.\n\n### CONFIGURATION PARAMETERS\n\nThe following main.cf parameters are especially relevant to this program.\n\nThe  text below provides only a parameter summary. See postconf(5) for more details including\nexamples.\n\naliasdatabase (see 'postconf -d' output)\nThe alias databases for local(8) delivery that are updated with \"newaliases\"  or  with\n\"sendmail -bi\".\n\nconfigdirectory (see 'postconf -d' output)\nThe default location of the Postfix main.cf and master.cf configuration files.\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\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\n### STANDARDS\n\nRFC 822 (ARPA Internet Text Messages)\n\n### SEE ALSO\n\naliases(5), format of alias database input file.\nlocal(8), Postfix local delivery agent.\npostconf(1), supported database types\npostconf(5), configuration parameters\npostmap(1), create/update/query lookup tables\nnewaliases(1), Sendmail compatibility interface.\npostlogd(8), Postfix logging\nsyslogd(8), system logging\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\nPOSTALIAS(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "postalias",
        "section": "1",
        "mode": "man",
        "summary": "postalias - Postfix alias database maintenance",
        "synopsis": "postalias [-Nfinoprsuvw] [-c configdir] [-d key] [-q key]\n[filetype:]filename ...",
        "flags": [
            {
                "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": "-i",
                "long": null,
                "arg": null,
                "description": "database. By default, postalias(1) creates a new database from the entries in filename."
            },
            {
                "flag": "-N",
                "long": null,
                "arg": null,
                "description": "fault, postalias(1) does whatever is the default for the host operating system."
            },
            {
                "flag": "-n",
                "long": null,
                "arg": null,
                "description": "By default, postalias(1) does whatever is the default for the host operating system."
            },
            {
                "flag": "-o",
                "long": null,
                "arg": null,
                "description": "postalias(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 in the aliases(5) manual page. 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": "-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 postalias(1) command can query any supported file type, but it can create only the following file types: btree The output is a btree file, named filename.db. This is available on systems with support for db databases. cdb The output is 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 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. The default value for this parameter depends on the host environment. filename The name of the alias database source file when creating a database."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "aliases",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/aliases/5/json"
            },
            {
                "name": "local",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/local/8/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": "postmap",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/postmap/1/json"
            },
            {
                "name": "newaliases",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/newaliases/1/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": 21,
                "subsections": [
                    {
                        "name": "-c",
                        "lines": 3,
                        "flag": "-c"
                    },
                    {
                        "name": "-d",
                        "lines": 5,
                        "flag": "-d"
                    },
                    {
                        "name": "-f",
                        "lines": 3,
                        "flag": "-f"
                    },
                    {
                        "name": "-i",
                        "lines": 3,
                        "flag": "-i"
                    },
                    {
                        "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": 9,
                        "flag": "-q"
                    },
                    {
                        "name": "-r",
                        "lines": 2,
                        "flag": "-r"
                    },
                    {
                        "name": "-s",
                        "lines": 4,
                        "flag": "-s"
                    },
                    {
                        "name": "-u",
                        "lines": 2,
                        "flag": "-u"
                    },
                    {
                        "name": "-v -v",
                        "lines": 2,
                        "flag": "-v"
                    },
                    {
                        "name": "-w",
                        "lines": 41,
                        "flag": "-w"
                    }
                ]
            },
            {
                "name": "DIAGNOSTICS",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "ENVIRONMENT",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "CONFIGURATION PARAMETERS",
                "lines": 42,
                "subsections": []
            },
            {
                "name": "STANDARDS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "README FILES",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 16,
                "subsections": []
            }
        ]
    }
}