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