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              sdbm   The output consists of two files, named file_name.pag and
123                     file_name.dir.  This is available on systems with support
124                     for sdbm databases.
125
126              When no file_type is specified, the software uses  the  database
127              type   specified  via  the  default_database_type  configuration
128              parameter.  The default value for this parameter depends on  the
129              host environment.
130
131       file_name
132              The name of the alias database source file when creating a data‐
133              base.
134

DIAGNOSTICS

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

ENVIRONMENT

145       MAIL_CONFIG
146              Directory with Postfix configuration files.
147
148       MAIL_VERBOSE
149              Enable verbose logging for debugging purposes.
150

CONFIGURATION PARAMETERS

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

STANDARDS

187       RFC 822 (ARPA Internet Text Messages)
188

SEE ALSO

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

README FILES

199       Use  "postconf readme_directory" or "postconf html_directory" to locate
200       this information.
201       DATABASE_README, Postfix lookup table overview
202

LICENSE

204       The Secure Mailer license must be distributed with this software.
205

AUTHOR(S)

207       Wietse Venema
208       IBM T.J. Watson Research
209       P.O. Box 704
210       Yorktown Heights, NY 10598, USA
211
212
213
214                                                                  POSTALIAS(1)
Impressum