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

NAME

6       postalias - Postfix alias database maintenance
7

SYNOPSIS

9       postalias [-Nfinoprsvw] [-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       -v     Enable  verbose  logging  for  debugging  purposes.  Multiple -v
95              options make the software increasingly verbose.
96
97       -w     When updating a table, do not complain about attempts to  update
98              existing entries, and ignore those attempts.
99
100       Arguments:
101
102       file_type
103              The database type. To find out what types are supported, use the
104              "postconf -m" command.
105
106              The postalias(1) command can query any supported file type,  but
107              it can create only the following file types:
108
109              btree  The  output is a btree file, named file_name.db.  This is
110                     available on systems with support for db databases.
111
112              cdb    The output is one  file  named  file_name.cdb.   This  is
113                     available on systems with support for cdb databases.
114
115              dbm    The output consists of two files, named file_name.pag and
116                     file_name.dir.  This is available on systems with support
117                     for dbm databases.
118
119              hash   The output is a hashed file, named file_name.db.  This is
120                     available on systems with support for db databases.
121
122              fail   A table that reliably fails all requests. The lookup  ta‐
123                     ble  name  is used for logging only. This table exists to
124                     simplify Postfix error tests.
125
126              sdbm   The output consists of two files, named file_name.pag and
127                     file_name.dir.  This is available on systems with support
128                     for sdbm databases.
129
130              When no file_type is specified, the software uses  the  database
131              type   specified  via  the  default_database_type  configuration
132              parameter.  The default value for this parameter depends on  the
133              host environment.
134
135       file_name
136              The name of the alias database source file when creating a data‐
137              base.
138

DIAGNOSTICS

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

ENVIRONMENT

149       MAIL_CONFIG
150              Directory with Postfix configuration files.
151
152       MAIL_VERBOSE
153              Enable verbose logging for debugging purposes.
154

CONFIGURATION PARAMETERS

156       The following main.cf parameters are especially relevant to  this  pro‐
157       gram.
158
159       The  text  below provides only a parameter summary. See postconf(5) for
160       more details including examples.
161
162       alias_database (see 'postconf -d' output)
163              The alias databases for local(8) delivery that are updated  with
164              "newaliases" or with "sendmail -bi".
165
166       config_directory (see 'postconf -d' output)
167              The  default  location of the Postfix main.cf and master.cf con‐
168              figuration files.
169
170       berkeley_db_create_buffer_size (16777216)
171              The per-table I/O buffer size for programs that create  Berkeley
172              DB hash or btree tables.
173
174       berkeley_db_read_buffer_size (131072)
175              The per-table I/O buffer size for programs that read Berkeley DB
176              hash or btree tables.
177
178       default_database_type (see 'postconf -d' output)
179              The default database type for use in newaliases(1), postalias(1)
180              and postmap(1) commands.
181
182       syslog_facility (mail)
183              The syslog facility of Postfix logging.
184
185       syslog_name (see 'postconf -d' output)
186              The  mail  system  name that is prepended to the process name in
187              syslog records, so that "smtpd"  becomes,  for  example,  "post‐
188              fix/smtpd".
189

STANDARDS

191       RFC 822 (ARPA Internet Text Messages)
192

SEE ALSO

194       aliases(5), format of alias database input file.
195       local(8), Postfix local delivery agent.
196       postconf(1), supported database types
197       postconf(5), configuration parameters
198       postmap(1), create/update/query lookup tables
199       newaliases(1), Sendmail compatibility interface.
200       syslogd(8), system logging
201

README FILES

203       Use  "postconf readme_directory" or "postconf html_directory" to locate
204       this information.
205       DATABASE_README, Postfix lookup table overview
206

LICENSE

208       The Secure Mailer license must be distributed with this software.
209

AUTHOR(S)

211       Wietse Venema
212       IBM T.J. Watson Research
213       P.O. Box 704
214       Yorktown Heights, NY 10598, USA
215
216
217
218                                                                  POSTALIAS(1)
Impressum