1<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
2        "http://www.w3.org/TR/html4/loose.dtd">
3<html> <head>
4<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5<link rel='stylesheet' type='text/css' href='postfix-doc.css'>
6<title> Postfix manual - postalias(1) </title>
7</head> <body> <pre>
8POSTALIAS(1)                                                      POSTALIAS(1)
9
10<b>NAME</b>
11       postalias - Postfix alias database maintenance
12
13<b>SYNOPSIS</b>
14       <b>postalias</b> [<b>-Nfinoprsuvw</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] [<b>-d</b> <i>key</i>] [<b>-q</b> <i>key</i>]
15               [<i>file</i><b>_</b><i>type</i>:]<i>file</i><b>_</b><i>name</i> ...
16
17<b>DESCRIPTION</b>
18       The  <a href="postalias.1.html"><b>postalias</b>(1)</a>  command creates or queries one or more Postfix alias
19       databases, or updates an existing one. The input and output  file  for-
20       mats  are  expected  to  be compatible with Sendmail version 8, and are
21       expected to be suitable for use as NIS alias maps.
22
23       If the result files do not exist they will be  created  with  the  same
24       group and other read permissions as their source file.
25
26       While  a  database update is in progress, signal delivery is postponed,
27       and an exclusive, advisory, lock is placed on the entire  database,  in
28       order to avoid surprises in spectator processes.
29
30       The format of Postfix alias input files is described in <a href="aliases.5.html"><b>aliases</b>(5)</a>.
31
32       By  default  the  lookup key is mapped to lowercase to make the lookups
33       case insensitive; as of Postfix 2.3 this case folding happens only with
34       tables whose lookup keys are fixed-case strings such as <a href="DATABASE_README.html#types">btree</a>:, <a href="DATABASE_README.html#types">dbm</a>: or
35       <a href="DATABASE_README.html#types">hash</a>:. With earlier versions, the lookup key is folded even with tables
36       where  a lookup field can match both upper and lower case text, such as
37       <a href="regexp_table.5.html">regexp</a>: and <a href="pcre_table.5.html">pcre</a>:. This resulted in loss of  information  with  $<i>number</i>
38       substitutions.
39
40       Options:
41
42       <b>-c</b> <i>config</i><b>_</b><i>dir</i>
43              Read  the  <a href="postconf.5.html"><b>main.cf</b></a>  configuration  file  in  the named directory
44              instead of the default configuration directory.
45
46       <b>-d</b> <i>key</i> Search the specified maps for <i>key</i> and remove one entry per  map.
47              The  exit  status  is  zero  when  the requested information was
48              found.
49
50              If a key value of <b>-</b> is specified, the program reads  key  values
51              from  the standard input stream. The exit status is zero when at
52              least one of the requested keys was found.
53
54       <b>-f</b>     Do not fold the lookup key  to  lower  case  while  creating  or
55              querying a table.
56
57              With  Postfix  version  2.3 and later, this option has no effect
58              for regular expression tables. There, case folding is controlled
59              by appending a flag to a pattern.
60
61       <b>-i</b>     Incremental  mode.  Read  entries from standard input and do not
62              truncate an existing database. By default, <a href="postalias.1.html"><b>postalias</b>(1)</a>  creates
63              a new database from the entries in <i>file</i><b>_</b><i>name</i>.
64
65       <b>-N</b>     Include  the  terminating  null character that terminates lookup
66              keys and values. By default, <a href="postalias.1.html"><b>postalias</b>(1)</a> does whatever  is  the
67              default for the host operating system.
68
69       <b>-n</b>     Don't  include  the  terminating  null character that terminates
70              lookup keys and values. By default, <a href="postalias.1.html"><b>postalias</b>(1)</a>  does  whatever
71              is the default for the host operating system.
72
73       <b>-o</b>     Do  not release root privileges when processing a non-root input
74              file. By default, <a href="postalias.1.html"><b>postalias</b>(1)</a> drops root privileges and runs as
75              the source file owner instead.
76
77       <b>-p</b>     Do  not  inherit the file access permissions from the input file
78              when creating a new file.   Instead,  create  a  new  file  with
79              default access permissions (mode 0644).
80
81       <b>-q</b> <i>key</i> Search  the  specified  maps  for  <i>key</i> and write the first value
82              found to the standard output stream. The  exit  status  is  zero
83              when the requested information was found.
84
85              Note:  this  performs  a single query with the key as specified,
86              and does not make iterative queries with substrings of  the  key
87              as described in the <a href="aliases.5.html">aliases(5)</a> manual page.
88
89              If  a  key value of <b>-</b> is specified, the program reads key values
90              from the standard input stream and writes one line of <i>key: value</i>
91              output for each key that was found. The exit status is zero when
92              at least one of the requested keys was found.
93
94       <b>-r</b>     When updating a table, do not complain about attempts to  update
95              existing entries, and make those updates anyway.
96
97       <b>-s</b>     Retrieve all database elements, and write one line of <i>key: value</i>
98              output for each element. The elements are  printed  in  database
99              order,  which  is not necessarily the same as the original input
100              order.  This feature is available in  Postfix  version  2.2  and
101              later, and is not available for all database types.
102
103       <b>-u</b>     Disable  UTF-8 support. UTF-8 support is enabled by default when
104              "<a href="postconf.5.html#smtputf8_enable">smtputf8_enable</a> = yes". It requires that keys  and  values  are
105              valid UTF-8 strings.
106
107       <b>-v</b>     Enable  verbose  logging  for  debugging  purposes.  Multiple <b>-v</b>
108              options make the software increasingly verbose.
109
110       <b>-w</b>     When updating a table, do not complain about attempts to  update
111              existing entries, and ignore those attempts.
112
113       Arguments:
114
115       <i>file</i><b>_</b><i>type</i>
116              The database type. To find out what types are supported, use the
117              "<b>postconf -m</b>" command.
118
119              The <a href="postalias.1.html"><b>postalias</b>(1)</a> command can query any supported file type,  but
120              it can create only the following file types:
121
122              <b>btree</b>  The  output is a btree file, named <i>file</i><b>_</b><i>name</i><b>.db</b>.  This is
123                     available on systems with support for <b>db</b> databases.
124
125              <b>cdb</b>    The output is one  file  named  <i>file</i><b>_</b><i>name</i><b>.cdb</b>.   This  is
126                     available on systems with support for <b>cdb</b> databases.
127
128              <b>dbm</b>    The output consists of two files, named <i>file</i><b>_</b><i>name</i><b>.pag</b> and
129                     <i>file</i><b>_</b><i>name</i><b>.dir</b>.  This is available on systems with support
130                     for <b>dbm</b> databases.
131
132              <b>fail</b>   A  table that reliably fails all requests. The lookup ta-
133                     ble name is used for logging only. This table  exists  to
134                     simplify Postfix error tests.
135
136              <b>hash</b>   The output is a hashed file, named <i>file</i><b>_</b><i>name</i><b>.db</b>.  This is
137                     available on systems with support for <b>db</b> databases.
138
139              <b>lmdb</b>   The output is a btree-based file,  named  <i>file</i><b>_</b><i>name</i><b>.lmdb</b>.
140                     <b>lmdb</b>  supports concurrent writes and reads from different
141                     processes,  unlike  other  supported  file-based  tables.
142                     This  is available on systems with support for <b>lmdb</b> data-
143                     bases.
144
145              <b>sdbm</b>   The output consists of two files, named <i>file</i><b>_</b><i>name</i><b>.pag</b> and
146                     <i>file</i><b>_</b><i>name</i><b>.dir</b>.  This is available on systems with support
147                     for <b>sdbm</b> databases.
148
149              When no <i>file</i><b>_</b><i>type</i> is specified, the software uses  the  database
150              type   specified  via  the  <b><a href="postconf.5.html#default_database_type">default_database_type</a></b>  configuration
151              parameter.  The default value for this parameter depends on  the
152              host environment.
153
154       <i>file</i><b>_</b><i>name</i>
155              The name of the alias database source file when creating a data-
156              base.
157
158<b>DIAGNOSTICS</b>
159       Problems are logged to the standard error stream and to  <b>syslogd</b>(8)  or
160       <a href="postlogd.8.html"><b>postlogd</b>(8)</a>.  No output means that no problems were detected. Duplicate
161       entries are skipped and are flagged with a warning.
162
163       <a href="postalias.1.html"><b>postalias</b>(1)</a> terminates with  zero  exit  status  in  case  of  success
164       (including  successful  "<b>postalias  -q</b>"  lookup)  and  terminates  with
165       non-zero exit status in case of failure.
166
167<b>ENVIRONMENT</b>
168       <b>MAIL_CONFIG</b>
169              Directory with Postfix configuration files.
170
171       <b>MAIL_VERBOSE</b>
172              Enable verbose logging for debugging purposes.
173
174<b>CONFIGURATION PARAMETERS</b>
175       The following <a href="postconf.5.html"><b>main.cf</b></a> parameters are especially relevant to  this  pro-
176       gram.
177
178       The  text  below provides only a parameter summary. See <a href="postconf.5.html"><b>postconf</b>(5)</a> for
179       more details including examples.
180
181       <b><a href="postconf.5.html#alias_database">alias_database</a> (see 'postconf -d' output)</b>
182              The alias databases for <a href="local.8.html"><b>local</b>(8)</a> delivery that are updated  with
183              "<b>newaliases</b>" or with "<b>sendmail -bi</b>".
184
185       <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b>
186              The  default  location of the Postfix <a href="postconf.5.html">main.cf</a> and <a href="master.5.html">master.cf</a> con-
187              figuration files.
188
189       <b><a href="postconf.5.html#berkeley_db_create_buffer_size">berkeley_db_create_buffer_size</a> (16777216)</b>
190              The per-table I/O buffer size for programs that create  Berkeley
191              DB hash or btree tables.
192
193       <b><a href="postconf.5.html#berkeley_db_read_buffer_size">berkeley_db_read_buffer_size</a> (131072)</b>
194              The per-table I/O buffer size for programs that read Berkeley DB
195              hash or btree tables.
196
197       <b><a href="postconf.5.html#default_database_type">default_database_type</a> (see 'postconf -d' output)</b>
198              The default database type for use in <a href="newaliases.1.html"><b>newaliases</b>(1)</a>, <a href="postalias.1.html"><b>postalias</b>(1)</a>
199              and <a href="postmap.1.html"><b>postmap</b>(1)</a> commands.
200
201       <b><a href="postconf.5.html#import_environment">import_environment</a> (see 'postconf -d' output)</b>
202              The  list  of  environment  variables  that a privileged Postfix
203              process will  import  from  a  non-Postfix  parent  process,  or
204              name=value environment overrides.
205
206       <b><a href="postconf.5.html#smtputf8_enable">smtputf8_enable</a> (yes)</b>
207              Enable  preliminary SMTPUTF8 support for the protocols described
208              in <a href="https://tools.ietf.org/html/rfc6531">RFC 6531</a>, <a href="https://tools.ietf.org/html/rfc6532">RFC 6532</a>, and <a href="https://tools.ietf.org/html/rfc6533">RFC 6533</a>.
209
210       <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b>
211              The syslog facility of Postfix logging.
212
213       <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
214              A prefix that  is  prepended  to  the  process  name  in  syslog
215              records, so that, for example, "smtpd" becomes "prefix/smtpd".
216
217       Available in Postfix 2.11 and later:
218
219       <b><a href="postconf.5.html#lmdb_map_size">lmdb_map_size</a> (16777216)</b>
220              The initial OpenLDAP LMDB database size limit in bytes.
221
222<b>STANDARDS</b>
223       <a href="https://tools.ietf.org/html/rfc822">RFC 822</a> (ARPA Internet Text Messages)
224
225<b>SEE ALSO</b>
226       <a href="aliases.5.html">aliases(5)</a>, format of alias database input file.
227       <a href="local.8.html">local(8)</a>, Postfix local delivery agent.
228       <a href="postconf.1.html">postconf(1)</a>, supported database types
229       <a href="postconf.5.html">postconf(5)</a>, configuration parameters
230       <a href="postmap.1.html">postmap(1)</a>, create/update/query lookup tables
231       <a href="newaliases.1.html">newaliases(1)</a>, Sendmail compatibility interface.
232       <a href="postlogd.8.html">postlogd(8)</a>, Postfix logging
233       syslogd(8), system logging
234
235<b>README FILES</b>
236       <a href="DATABASE_README.html">DATABASE_README</a>, Postfix lookup table overview
237
238<b>LICENSE</b>
239       The Secure Mailer license must be distributed with this software.
240
241<b>AUTHOR(S)</b>
242       Wietse Venema
243       IBM T.J. Watson Research
244       P.O. Box 704
245       Yorktown Heights, NY 10598, USA
246
247       Wietse Venema
248       Google, Inc.
249       111 8th Avenue
250       New York, NY 10011, USA
251
252                                                                  POSTALIAS(1)
253</pre> </body> </html>
254