1POSTALIAS(1)                General Commands Manual               POSTALIAS(1)
2
3
4

NAME

6       postalias - Postfix alias database maintenance
7

SYNOPSIS

9       postalias [-Nfinoprsuvw] [-c config_dir] [-d key] [-q key]
10               [file_type:]file_name ...
11

DESCRIPTION

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 ex‐
16       pected 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 in‐
39              stead 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  de‐
74              fault 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 op‐
103              tions 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              fail   A  table that reliably fails all requests. The lookup ta‐
128                     ble name is used for logging only. This table  exists  to
129                     simplify Postfix error tests.
130
131              hash   The output is a hashed file, named file_name.db.  This is
132                     available on systems with support for db databases.
133
134              lmdb   The output is a btree-based file,  named  file_name.lmdb.
135                     lmdb  supports concurrent writes and reads from different
136                     processes,  unlike  other  supported  file-based  tables.
137                     This  is available on systems with support for lmdb data‐
138                     bases.
139
140              sdbm   The output consists of two files, named file_name.pag and
141                     file_name.dir.  This is available on systems with support
142                     for sdbm databases.
143
144              When no file_type is specified, the software uses  the  database
145              type  specified  via the default_database_type configuration pa‐
146              rameter.  The default value for this parameter  depends  on  the
147              host environment.
148
149       file_name
150              The name of the alias database source file when creating a data‐
151              base.
152

DIAGNOSTICS

154       Problems are logged to the standard error stream and to  syslogd(8)  or
155       postlogd(8).  No output means that no problems were detected. Duplicate
156       entries are skipped and are flagged with a warning.
157
158       postalias(1) terminates with zero exit status in case of  success  (in‐
159       cluding  successful "postalias -q" lookup) and terminates with non-zero
160       exit status in case of failure.
161

ENVIRONMENT

163       MAIL_CONFIG
164              Directory with Postfix configuration files.
165
166       MAIL_VERBOSE
167              Enable verbose logging for debugging purposes.
168

CONFIGURATION PARAMETERS

170       The following main.cf parameters are especially relevant to  this  pro‐
171       gram.
172
173       The  text  below provides only a parameter summary. See postconf(5) for
174       more details including examples.
175
176       alias_database (see 'postconf -d' output)
177              The alias databases for local(8) delivery that are updated  with
178              "newaliases" or with "sendmail -bi".
179
180       config_directory (see 'postconf -d' output)
181              The  default  location of the Postfix main.cf and master.cf con‐
182              figuration files.
183
184       berkeley_db_create_buffer_size (16777216)
185              The per-table I/O buffer size for programs that create  Berkeley
186              DB hash or btree tables.
187
188       berkeley_db_read_buffer_size (131072)
189              The per-table I/O buffer size for programs that read Berkeley DB
190              hash or btree tables.
191
192       default_database_type (see 'postconf -d' output)
193              The default database type for use in newaliases(1), postalias(1)
194              and postmap(1) commands.
195
196       import_environment (see 'postconf -d' output)
197              The  list  of  environment  parameters that a privileged Postfix
198              process will  import  from  a  non-Postfix  parent  process,  or
199              name=value environment overrides.
200
201       smtputf8_enable (yes)
202              Enable  preliminary SMTPUTF8 support for the protocols described
203              in RFC 6531..6533.
204
205       syslog_facility (mail)
206              The syslog facility of Postfix logging.
207
208       syslog_name (see 'postconf -d' output)
209              A prefix that  is  prepended  to  the  process  name  in  syslog
210              records, so that, for example, "smtpd" becomes "prefix/smtpd".
211
212       Available in Postfix 2.11 and later:
213
214       lmdb_map_size (16777216)
215              The initial OpenLDAP LMDB database size limit in bytes.
216

STANDARDS

218       RFC 822 (ARPA Internet Text Messages)
219

SEE ALSO

221       aliases(5), format of alias database input file.
222       local(8), Postfix local delivery agent.
223       postconf(1), supported database types
224       postconf(5), configuration parameters
225       postmap(1), create/update/query lookup tables
226       newaliases(1), Sendmail compatibility interface.
227       postlogd(8), Postfix logging
228       syslogd(8), system logging
229

README FILES

231       Use  "postconf readme_directory" or "postconf html_directory" to locate
232       this information.
233       DATABASE_README, Postfix lookup table overview
234

LICENSE

236       The Secure Mailer license must be distributed with this software.
237

AUTHOR(S)

239       Wietse Venema
240       IBM T.J. Watson Research
241       P.O. Box 704
242       Yorktown Heights, NY 10598, USA
243
244       Wietse Venema
245       Google, Inc.
246       111 8th Avenue
247       New York, NY 10011, USA
248
249
250
251                                                                  POSTALIAS(1)
Impressum