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
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              If  a  key value of - is specified, the program reads key values
81              from the standard input stream and writes one line of key: value
82              output for each key that was found. The exit status is zero when
83              at least one of the requested keys was found.
84
85       -r     When updating a table, do not complain about attempts to  update
86              existing entries, and make those updates anyway.
87
88       -s     Retrieve all database elements, and write one line of key: value
89              output for each element. The elements are  printed  in  database
90              order,  which  is not necessarily the same as the original input
91              order.  This feature is available in  Postfix  version  2.2  and
92              later, and is not available for all database types.
93
94       -u     Disable  UTF-8 support. UTF-8 support is enabled by default when
95              "smtputf8_enable = yes". It requires that keys  and  values  are
96              valid UTF-8 strings.
97
98       -v     Enable  verbose  logging  for  debugging  purposes.  Multiple -v
99              options make the software increasingly verbose.
100
101       -w     When updating a table, do not complain about attempts to  update
102              existing entries, and ignore those attempts.
103
104       Arguments:
105
106       file_type
107              The database type. To find out what types are supported, use the
108              "postconf -m" command.
109
110              The postalias(1) command can query any supported file type,  but
111              it can create only the following file types:
112
113              btree  The  output is a btree file, named file_name.db.  This is
114                     available on systems with support for db databases.
115
116              cdb    The output is one  file  named  file_name.cdb.   This  is
117                     available on systems with support for cdb databases.
118
119              dbm    The output consists of two files, named file_name.pag and
120                     file_name.dir.  This is available on systems with support
121                     for dbm databases.
122
123              hash   The output is a hashed file, named file_name.db.  This is
124                     available on systems with support for db databases.
125
126              fail   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              sdbm   The output consists of two files, named file_name.pag and
131                     file_name.dir.  This is available on systems with support
132                     for sdbm databases.
133
134              When no file_type is specified, the software uses  the  database
135              type   specified  via  the  default_database_type  configuration
136              parameter.  The default value for this parameter depends on  the
137              host environment.
138
139       file_name
140              The name of the alias database source file when creating a data‐
141              base.
142

DIAGNOSTICS

144       Problems are logged to the standard error stream and to syslogd(8).  No
145       output  means  that  no  problems  were detected. Duplicate entries are
146       skipped and are flagged with a warning.
147
148       postalias(1) terminates with  zero  exit  status  in  case  of  success
149       (including  successful  "postalias  -q"  lookup)  and  terminates  with
150       non-zero exit status in case of failure.
151

ENVIRONMENT

153       MAIL_CONFIG
154              Directory with Postfix configuration files.
155
156       MAIL_VERBOSE
157              Enable verbose logging for debugging purposes.
158

CONFIGURATION PARAMETERS

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

STANDARDS

203       RFC 822 (ARPA Internet Text Messages)
204

SEE ALSO

206       aliases(5), format of alias database input file.
207       local(8), Postfix local delivery agent.
208       postconf(1), supported database types
209       postconf(5), configuration parameters
210       postmap(1), create/update/query lookup tables
211       newaliases(1), Sendmail compatibility interface.
212       syslogd(8), system logging
213

README FILES

215       Use  "postconf readme_directory" or "postconf html_directory" to locate
216       this information.
217       DATABASE_README, Postfix lookup table overview
218

LICENSE

220       The Secure Mailer license must be distributed with this software.
221

AUTHOR(S)

223       Wietse Venema
224       IBM T.J. Watson Research
225       P.O. Box 704
226       Yorktown Heights, NY 10598, USA
227
228       Wietse Venema
229       Google, Inc.
230       111 8th Avenue
231       New York, NY 10011, USA
232
233
234
235                                                                  POSTALIAS(1)
Impressum