autoupdate
[postfix-master.git] / postfix-master / postalias.1.html
blobe78cade273c956904cc057299a1bcd5d8aca8589
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>
7 POSTALIAS(1) POSTALIAS(1)
9 <b>NAME</b>
10 postalias - Postfix alias database maintenance
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> ...
16 <b>DESCRIPTION</b>
17 The <a href="postalias.1.html"><b>postalias</b>(1)</a> command creates or queries one or more
18 Postfix alias databases, or updates an existing one. The
19 input and output file formats are expected to be compati-
20 ble with Sendmail version 8, and are expected to be suit-
21 able for the use as NIS alias maps.
23 If the result files do not exist they will be created with
24 the same group and other read permissions as their source
25 file.
27 While a database update is in progress, signal delivery is
28 postponed, and an exclusive, advisory, lock is placed on
29 the entire database, in order to avoid surprises in spec-
30 tator processes.
32 The format of Postfix alias input files is described in
33 <a href="aliases.5.html"><b>aliases</b>(5)</a>.
35 By default the lookup key is mapped to lowercase to make
36 the lookups case insensitive; as of Postfix 2.3 this case
37 folding happens only with tables whose lookup keys are
38 fixed-case strings such as btree:, dbm: or hash:. With
39 earlier versions, the lookup key is folded even with
40 tables where a lookup field can match both upper and lower
41 case text, such as <a href="regexp_table.5.html">regexp</a>: and <a href="pcre_table.5.html">pcre</a>:. This resulted in
42 loss of information with $<i>number</i> substitutions.
44 Options:
46 <b>-c</b> <i>config</i><b>_</b><i>dir</i>
47 Read the <a href="postconf.5.html"><b>main.cf</b></a> configuration file in the named
48 directory instead of the default configuration
49 directory.
51 <b>-d</b> <i>key</i> Search the specified maps for <i>key</i> and remove one
52 entry per map. The exit status is zero when the
53 requested information was found.
55 If a key value of <b>-</b> is specified, the program reads
56 key values from the standard input stream. The exit
57 status is zero when at least one of the requested
58 keys was found.
60 <b>-f</b> Do not fold the lookup key to lower case while cre-
61 ating or querying a table.
63 With Postfix version 2.3 and later, this option has
64 no effect for regular expression tables. There,
65 case folding is controlled by appending a flag to a
66 pattern.
68 <b>-i</b> Incremental mode. Read entries from standard input
69 and do not truncate an existing database. By
70 default, <a href="postalias.1.html"><b>postalias</b>(1)</a> creates a new database from
71 the entries in <i>file</i><b>_</b><i>name</i>.
73 <b>-N</b> Include the terminating null character that termi-
74 nates lookup keys and values. By default, <b>postal-</b>
75 <b>ias</b>(1) does whatever is the default for the host
76 operating system.
78 <b>-n</b> Don't include the terminating null character that
79 terminates lookup keys and values. By default,
80 <a href="postalias.1.html"><b>postalias</b>(1)</a> does whatever is the default for the
81 host operating system.
83 <b>-o</b> Do not release root privileges when processing a
84 non-root input file. By default, <a href="postalias.1.html"><b>postalias</b>(1)</a> drops
85 root privileges and runs as the source file owner
86 instead.
88 <b>-p</b> Do not inherit the file access permissions from the
89 input file when creating a new file. Instead, cre-
90 ate a new file with default access permissions
91 (mode 0644).
93 <b>-q</b> <i>key</i> Search the specified maps for <i>key</i> and write the
94 first value found to the standard output stream.
95 The exit status is zero when the requested informa-
96 tion was found.
98 If a key value of <b>-</b> is specified, the program reads
99 key values from the standard input stream and
100 writes one line of <i>key: value</i> output for each key
101 that was found. The exit status is zero when at
102 least one of the requested keys was found.
104 <b>-r</b> When updating a table, do not complain about
105 attempts to update existing entries, and make those
106 updates anyway.
108 <b>-s</b> Retrieve all database elements, and write one line
109 of <i>key: value</i> output for each element. The elements
110 are printed in database order, which is not neces-
111 sarily the same as the original input order. This
112 feature is available in Postfix version 2.2 and
113 later, and is not available for all database types.
115 <b>-v</b> Enable verbose logging for debugging purposes. Mul-
116 tiple <b>-v</b> options make the software increasingly
117 verbose.
119 <b>-w</b> When updating a table, do not complain about
120 attempts to update existing entries, and ignore
121 those attempts.
123 Arguments:
125 <i>file</i><b>_</b><i>type</i>
126 The database type. To find out what types are sup-
127 ported, use the "<b>postconf -m</b>" command.
129 The <a href="postalias.1.html"><b>postalias</b>(1)</a> command can query any supported
130 file type, but it can create only the following
131 file types:
133 <b>btree</b> The output is a btree file, named
134 <i>file</i><b>_</b><i>name</i><b>.db</b>. This is available on systems
135 with support for <b>db</b> databases.
137 <b>cdb</b> The output is one file named <i>file</i><b>_</b><i>name</i><b>.cdb</b>.
138 This is available on systems with support
139 for <b>cdb</b> databases.
141 <b>dbm</b> The output consists of two files, named
142 <i>file</i><b>_</b><i>name</i><b>.pag</b> and <i>file</i><b>_</b><i>name</i><b>.dir</b>. This is
143 available on systems with support for <b>dbm</b>
144 databases.
146 <b>hash</b> The output is a hashed file, named
147 <i>file</i><b>_</b><i>name</i><b>.db</b>. This is available on systems
148 with support for <b>db</b> databases.
150 <b>sdbm</b> The output consists of two files, named
151 <i>file</i><b>_</b><i>name</i><b>.pag</b> and <i>file</i><b>_</b><i>name</i><b>.dir</b>. This is
152 available on systems with support for <b>sdbm</b>
153 databases.
155 When no <i>file</i><b>_</b><i>type</i> is specified, the software uses
156 the database type specified via the <b><a href="postconf.5.html#default_database_type">default_data</a>-</b>
157 <b><a href="postconf.5.html#default_database_type">base_type</a></b> configuration parameter. The default
158 value for this parameter depends on the host envi-
159 ronment.
161 <i>file</i><b>_</b><i>name</i>
162 The name of the alias database source file when
163 creating a database.
165 <b>DIAGNOSTICS</b>
166 Problems are logged to the standard error stream and to
167 <b>syslogd</b>(8). No output means that no problems were
168 detected. Duplicate entries are skipped and are flagged
169 with a warning.
171 <a href="postalias.1.html"><b>postalias</b>(1)</a> terminates with zero exit status in case of
172 success (including successful "<b>postalias -q</b>" lookup) and
173 terminates with non-zero exit status in case of failure.
175 <b>ENVIRONMENT</b>
176 <b>MAIL_CONFIG</b>
177 Directory with Postfix configuration files.
179 <b>MAIL_VERBOSE</b>
180 Enable verbose logging for debugging purposes.
182 <b>CONFIGURATION PARAMETERS</b>
183 The following <a href="postconf.5.html"><b>main.cf</b></a> parameters are especially relevant
184 to this program.
186 The text below provides only a parameter summary. See
187 <a href="postconf.5.html"><b>postconf</b>(5)</a> for more details including examples.
189 <b><a href="postconf.5.html#alias_database">alias_database</a> (see 'postconf -d' output)</b>
190 The alias databases for <a href="local.8.html"><b>local</b>(8)</a> delivery that are
191 updated with "<b>newaliases</b>" or with "<b>sendmail -bi</b>".
193 <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b>
194 The default location of the Postfix <a href="postconf.5.html">main.cf</a> and
195 <a href="master.5.html">master.cf</a> configuration files.
197 <b><a href="postconf.5.html#berkeley_db_create_buffer_size">berkeley_db_create_buffer_size</a> (16777216)</b>
198 The per-table I/O buffer size for programs that
199 create Berkeley DB hash or btree tables.
201 <b><a href="postconf.5.html#berkeley_db_read_buffer_size">berkeley_db_read_buffer_size</a> (131072)</b>
202 The per-table I/O buffer size for programs that
203 read Berkeley DB hash or btree tables.
205 <b><a href="postconf.5.html#default_database_type">default_database_type</a> (see 'postconf -d' output)</b>
206 The default database type for use in <a href="newaliases.1.html"><b>newaliases</b>(1)</a>,
207 <a href="postalias.1.html"><b>postalias</b>(1)</a> and <a href="postmap.1.html"><b>postmap</b>(1)</a> commands.
209 <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b>
210 The syslog facility of Postfix logging.
212 <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
213 The mail system name that is prepended to the
214 process name in syslog records, so that "smtpd"
215 becomes, for example, "postfix/smtpd".
217 <b>STANDARDS</b>
218 <a href="http://tools.ietf.org/html/rfc822">RFC 822</a> (ARPA Internet Text Messages)
220 <b>SEE ALSO</b>
221 <a href="aliases.5.html">aliases(5)</a>, format of alias database input file.
222 <a href="local.8.html">local(8)</a>, Postfix local delivery agent.
223 <a href="postconf.1.html">postconf(1)</a>, supported database types
224 <a href="postconf.5.html">postconf(5)</a>, configuration parameters
225 <a href="postmap.1.html">postmap(1)</a>, create/update/query lookup tables
226 <a href="newaliases.1.html">newaliases(1)</a>, Sendmail compatibility interface.
227 syslogd(8), system logging
229 <b>README FILES</b>
230 <a href="DATABASE_README.html">DATABASE_README</a>, Postfix lookup table overview
232 <b>LICENSE</b>
233 The Secure Mailer license must be distributed with this
234 software.
236 <b>AUTHOR(S)</b>
237 Wietse Venema
238 IBM T.J. Watson Research
239 P.O. Box 704
240 Yorktown Heights, NY 10598, USA
242 POSTALIAS(1)
243 </pre> </body> </html>