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