POSTMAP(1) POSTMAP(1) [1mNAME[0m postmap - Postfix lookup table management [1mSYNOPSIS[0m [1mpostmap [22m[[1m-Nfinopruvw[22m] [[1m-c [4m[22mconfig_dir[24m] [[1m-d [4m[22mkey[24m] [[1m-q [4m[22mkey[24m] [[4mfile_type[24m:][4mfile_name[24m ... [1mDESCRIPTION[0m The [1mpostmap [22mcommand creates or queries one or more Postfix lookup tables, or updates an existing one. The input and output file formats are expected to be compatible with: [1mmakemap [4m[22mfile_type[24m [4mfile_name[24m < [4mfile_name[0m If the result files do not exist they will be created with the same group and other read permissions as the source file. While the table update is in progress, signal delivery is postponed, and an exclusive, advisory, lock is placed on the entire table, in order to avoid surprises in spectator programs. [1mINPUT FILE FORMAT[0m The format of a lookup table input file is as follows: o A table entry has the form [4mkey[24m whitespace [4mvalue[0m o Empty lines and whitespace-only lines are ignored, as are lines whose first non-whitespace character is a `#'. o A logical line starts with non-whitespace text. A line that starts with whitespace continues a logical line. The [4mkey[24m and [4mvalue[24m are processed as is, except that surrounding white space is stripped off. Unlike with Postfix alias databases, quotes can- not be used to protect lookup keys that contain special characters such as `#' or whitespace. The [4mkey[24m is mapped to lowercase to make mapping lookups case insensitive. [1mCOMMAND-LINE ARGUMENTS[0m [1m-c [4m[22mconfig_dir[0m Read the [1mmain.cf [22mconfiguration file in the named directory instead of the default configuration directory. [1m-d [4m[22mkey[24m Search the specified maps for [4mkey[24m and remove one entry per map. The exit status is zero when the requested information was found. If a key value of [1m- [22mis 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. [1m-f [22mDo not fold the lookup key to lower case while creating or querying a map. [1m-i [22mIncremental mode. Read entries from standard input and do not truncate an existing database. By default, [1mpostmap [22mcreates a new database from the entries in [1mfile_name[22m. [1m-N [22mInclude the terminating null character that terminates lookup keys and values. By default, Postfix does whatever is the default for the host operating system. [1m-n [22mDon't include the terminating null character that terminates lookup keys and values. By default, Postfix does whatever is the default for the host operating system. [1m-o [22mDo not release root privileges when processing a non-root input file. By default, [1mpostmap [22mdrops root privileges and runs as the source file owner instead. [1m-p [22mDo not inherit the file access permissions from the input file when creating a new file. Instead, create a new file with default access permissions (mode 0644). [1m-q [4m[22mkey[24m Search the specified maps for [4mkey[24m and write the first value found to the standard output stream. The exit status is zero when the requested information was found. If a key value of [1m- [22mis specified, the program reads key values from the standard input stream and writes one line of [4mkey[24m [4mvalue[0m output for each key that was found. The exit status is zero when at least one of the requested keys was found. [1m-r [22mWhen updating a table, do not warn about duplicate entries; silently replace them. [1m-u [22mUpgrade the database to the current version. [1m-v [22mEnable verbose logging for debugging purposes. Multiple [1m-v[0m options make the software increasingly verbose. [1m-w [22mWhen updating a table, do not warn about duplicate entries; silently ignore them. Arguments: [4mfile_type[0m The database type. To find out what types are supported, use the "[1mpostconf -m" command.[0m [1mThe postmap [22mcommand can query any supported file type, but it can create only the following file types: [1mbtree [22mThe output file is a btree file, named [4mfile_name[24m[1m.db[22m. This is available only on systems with support for [1mdb[0m databases. [1mdbm [22mThe output consists of two files, named [4mfile_name[24m[1m.pag [22mand [4mfile_name[24m[1m.dir[22m. This is available only on systems with support for [1mdbm [22mdatabases. [1mhash [22mThe output file is a hashed file, named [4mfile_name[24m[1m.db[22m. This is available only on systems with support for [1mdb[0m databases. Use the command [1mpostconf -m [22mto find out what types of database your Postfix installation can support. When no [4mfile_type[24m is specified, the software uses the database type specified via the [1mdefault_database_type [22mconfiguration parameter. [4mfile_name[0m The name of the lookup table source file when rebuilding a data- base. [1mDIAGNOSTICS[0m Problems are logged to the standard error stream and to [1msyslogd[22m(8). No output means that no problems were detected. Duplicate entries are skipped and are flagged with a warning. [1mpostmap [22mterminates with zero exit status in case of success (including successful [1mpostmap -q [22mlookup) and terminates with non-zero exit status in case of failure. [1mENVIRONMENT[0m [1mMAIL_CONFIG[0m Directory with Postfix configuration files. [1mMAIL_VERBOSE[0m Enable verbose logging for debugging purposes. [1mCONFIGURATION PARAMETERS[0m The following [1mmain.cf [22mparameters are especially relevant to this pro- gram. The text below provides only a parameter summary. See post- conf(5) for more details including examples. [1mberkeley_db_create_buffer_size (16777216)[0m The per-table I/O buffer size for programs that create Berkeley DB hash or btree tables. [1mberkeley_db_read_buffer_size (131072)[0m The per-table I/O buffer size for programs that read Berkeley DB hash or btree tables. [1mconfig_directory (see 'postconf -d' output)[0m The default location of the Postfix main.cf and master.cf con- figuration files. [1mdefault_database_type (see 'postconf -d' output)[0m The default database type for use in newaliases(1), postalias(1) and postmap(1) commands. [1msyslog_facility (mail)[0m The syslog facility of Postfix logging. [1msyslog_name (postfix)[0m The mail system name that is prepended to the process name in syslog records, so that "smtpd" becomes, for example, "post- fix/smtpd". [1mSEE ALSO[0m postalias(1), create/update/query alias database postconf(1), supported database types postconf(5), configuration parameters syslogd(8), system logging [1mREADME FILES[0m this information. DATABASE_README, Postfix lookup table overview [1mLICENSE[0m The Secure Mailer license must be distributed with this software. [1mAUTHOR(S)[0m Wietse Venema IBM T.J. Watson Research P.O. Box 704 Yorktown Heights, NY 10598, USA POSTMAP(1)