NetBSD/gnu/dist/postfix/html/postmap.1.html

201 lines
6.1 KiB
HTML

<html> <head> </head> <body> <pre>
POSTMAP(1) POSTMAP(1)
<b>NAME</b>
postmap - Postfix lookup table management
<b>SYNOPSIS</b>
<b>postmap</b> [<b>-Ninrvw</b>] [<b>-c</b> <i>config_dir</i>] [<b>-d</b> <i>key</i>] [<b>-q</b> <i>key</i>]
[<i>file_type</i>:]<i>file_name</i> ...
<b>DESCRIPTION</b>
The <b>postmap</b> command 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:
<b>makemap</b> <i>file_type</i> <i>file_name</i> &lt; <i>file_name</i>
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.
The format of a lookup table input file is as follows:
<b>o</b> Blank lines are ignored. So are lines beginning
with `#'.
<b>o</b> A table entry has the form
<i>key</i> whitespace <i>value</i>
<b>o</b> A line that starts with whitespace continues the
preceding line.
The <i>key</i> and <i>value</i> are processed as is, except that sur-
rounding white space is stripped off. Unlike with Postfix
alias databases, quotes cannot be used to protect lookup
keys that contain special characters such as `#' or
whitespace. The <i>key</i> is mapped to lowercase to make mapping
lookups case insensitive.
Options:
<b>-N</b> Include the terminating null character that termi-
nates lookup keys and values. By default, Postfix
does whatever is the default for the host operating
system.
<b>-c</b> <i>config_dir</i>
Read the <b>main.cf</b> configuration file in the named
directory instead of the default configuration
directory.
<b>-d</b> <i>key</i> Search the specified maps for <i>key</i> and remove one
entry per map. The exit status is non-zero if the
requested information was not found.
1
POSTMAP(1) POSTMAP(1)
<b>-i</b> Incremental mode. Read entries from standard input
and do not truncate an existing database. By
default, <b>postmap</b> creates a new database from the
entries in <b>file</b><i>_</i><b>name</b>.
<b>-n</b> Don'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.
<b>-q</b> <i>key</i> Search the specified maps for <i>key</i> and print the
first value found on the standard output stream.
The exit status is non-zero if the requested infor-
mation was not found.
<b>-r</b> When updating a table, do not warn about duplicate
entries; silently replace them.
<b>-v</b> Enable verbose logging for debugging purposes. Mul-
tiple <b>-v</b> options make the software increasingly
verbose.
<b>-w</b> When updating a table, do not warn about duplicate
entries; silently ignore them.
Arguments:
<i>file_type</i>
The type of database to be produced.
<b>btree</b> The output file is a btree file, named
<i>file_name</i><b>.db</b>. This is available only on
systems with support for <b>db</b> databases.
<b>dbm</b> The output consists of two files, named
<i>file_name</i><b>.pag</b> and <i>file_name</i><b>.dir</b>. This is
available only on systems with support for
<b>dbm</b> databases.
<b>hash</b> The output file is a hashed file, named
<i>file_name</i><b>.db</b>. This is available only on
systems with support for <b>db</b> databases.
When no <i>file_type</i> is specified, the software uses
the database type specified via the <b>database</b><i>_</i><b>type</b>
configuration parameter.
<i>file_name</i>
The name of the lookup table source file when
rebuilding a database.
<b>DIAGNOSTICS</b>
Problems and transactions are logged to the standard error
stream. No output means no problems. Duplicate entries are
2
POSTMAP(1) POSTMAP(1)
skipped and are flagged with a warning.
<b>postmap</b> terminates with zero exit status in case of suc-
cess (including successful <b>postmap</b> <b>-q</b> lookup) and termi-
nates with non-zero exit status in case of failure.
<b>BUGS</b>
The "delete key" support is limited to one delete opera-
tion per command invocation.
<b>ENVIRONMENT</b>
<b>MAIL</b><i>_</i><b>CONFIG</b>
Directory with Postfix configuration files.
<b>MAIL</b><i>_</i><b>VERBOSE</b>
Enable verbose logging for debugging purposes.
<b>CONFIGURATION</b> <b>PARAMETERS</b>
<b>database</b><i>_</i><b>type</b>
Default output database type. On many UNIX sys-
tems, the default database type is either <b>hash</b> or
<b>dbm</b>.
<b>LICENSE</b>
The Secure Mailer license must be distributed with this
software.
<b>AUTHOR(S)</b>
Wietse Venema
IBM T.J. Watson Research
P.O. Box 704
Yorktown Heights, NY 10598, USA
3
</pre> </body> </html>