9 Postfix alias database maintenance
14 \fBpostalias\fR [\fB-Nfinoprsvw\fR] [\fB-c \fIconfig_dir\fR]
15 [\fB-d \fIkey\fR] [\fB-q \fIkey\fR]
16 [\fIfile_type\fR:]\fIfile_name\fR ...
20 The \fBpostalias\fR(1) command creates or queries one or more Postfix
21 alias databases, or updates an existing one. The input and output
22 file formats are expected to be compatible with Sendmail version 8,
23 and are expected to be suitable for the use as NIS alias maps.
25 If the result files do not exist they will be created with the
26 same group and other read permissions as their source file.
28 While a database update is in progress, signal delivery is
29 postponed, and an exclusive, advisory, lock is placed on the
30 entire database, in order to avoid surprises in spectator
33 The format of Postfix alias input files is described in
36 By default the lookup key is mapped to lowercase to make
37 the lookups case insensitive; as of Postfix 2.3 this case
38 folding happens only with tables whose lookup keys are
39 fixed-case strings such as btree:, dbm: or hash:. With
40 earlier versions, the lookup key is folded even with tables
41 where a lookup field can match both upper and lower case
42 text, such as regexp: and pcre:. This resulted in loss of
43 information with $\fInumber\fR substitutions.
46 .IP "\fB-c \fIconfig_dir\fR"
47 Read the \fBmain.cf\fR configuration file in the named directory
48 instead of the default configuration directory.
50 Search the specified maps for \fIkey\fR and remove one entry per map.
51 The exit status is zero when the requested information was found.
53 If a key value of \fB-\fR is specified, the program reads key
54 values from the standard input stream. The exit status is zero
55 when at least one of the requested keys was found.
57 Do not fold the lookup key to lower case while creating or querying
60 With Postfix version 2.3 and later, this option has no
61 effect for regular expression tables. There, case folding
62 is controlled by appending a flag to a pattern.
64 Incremental mode. Read entries from standard input and do not
65 truncate an existing database. By default, \fBpostalias\fR(1) creates
66 a new database from the entries in \fIfile_name\fR.
68 Include the terminating null character that terminates lookup keys
69 and values. By default, \fBpostalias\fR(1) does whatever
71 the host operating system.
73 Don't include the terminating null character that terminates lookup
74 keys and values. By default, \fBpostalias\fR(1) does whatever
76 the host operating system.
78 Do not release root privileges when processing a non-root
79 input file. By default, \fBpostalias\fR(1) drops root privileges
80 and runs as the source file owner instead.
82 Do not inherit the file access permissions from the input file
83 when creating a new file. Instead, create a new file with default
84 access permissions (mode 0644).
86 Search the specified maps for \fIkey\fR and write the first value
87 found to the standard output stream. The exit status is zero
88 when the requested information was found.
90 If a key value of \fB-\fR is specified, the program reads key
91 values from the standard input stream and writes one line of
92 \fIkey: value\fR output for each key that was found. The exit
93 status is zero when at least one of the requested keys was found.
95 When updating a table, do not complain about attempts to update
96 existing entries, and make those updates anyway.
98 Retrieve all database elements, and write one line of
99 \fIkey: value\fR output for each element. The elements are
100 printed in database order, which is not necessarily the same
101 as the original input order.
102 This feature is available in Postfix version 2.2 and later,
103 and is not available for all database types.
105 Enable verbose logging for debugging purposes. Multiple \fB-v\fR
106 options make the software increasingly verbose.
108 When updating a table, do not complain about attempts to update
109 existing entries, and ignore those attempts.
113 The database type. To find out what types are supported, use
114 the "\fBpostconf -m\fR" command.
116 The \fBpostalias\fR(1) command can query any supported file type,
117 but it can create only the following file types:
120 The output is a btree file, named \fIfile_name\fB.db\fR.
121 This is available on systems with support for \fBdb\fR databases.
123 The output is one file named \fIfile_name\fB.cdb\fR.
124 This is available on systems with support for \fBcdb\fR databases.
126 The output consists of two files, named \fIfile_name\fB.pag\fR and
127 \fIfile_name\fB.dir\fR.
128 This is available on systems with support for \fBdbm\fR databases.
130 The output is a hashed file, named \fIfile_name\fB.db\fR.
131 This is available on systems with support for \fBdb\fR databases.
133 The output consists of two files, named \fIfile_name\fB.pag\fR and
134 \fIfile_name\fB.dir\fR.
135 This is available on systems with support for \fBsdbm\fR databases.
137 When no \fIfile_type\fR is specified, the software uses the database
138 type specified via the \fBdefault_database_type\fR configuration
140 The default value for this parameter depends on the host environment.
143 The name of the alias database source file when creating a database.
147 Problems are logged to the standard error stream and to
148 \fBsyslogd\fR(8). No output means that
149 no problems were detected. Duplicate entries are skipped and are
150 flagged with a warning.
152 \fBpostalias\fR(1) terminates with zero exit status in case of success
153 (including successful "\fBpostalias -q\fR" lookup) and terminates
154 with non-zero exit status in case of failure.
160 .IP \fBMAIL_CONFIG\fR
161 Directory with Postfix configuration files.
162 .IP \fBMAIL_VERBOSE\fR
163 Enable verbose logging for debugging purposes.
164 .SH "CONFIGURATION PARAMETERS"
169 The following \fBmain.cf\fR parameters are especially relevant to
172 The text below provides only a parameter summary. See
173 \fBpostconf\fR(5) for more details including examples.
174 .IP "\fBalias_database (see 'postconf -d' output)\fR"
175 The alias databases for \fBlocal\fR(8) delivery that are updated with
176 "\fBnewaliases\fR" or with "\fBsendmail -bi\fR".
177 .IP "\fBconfig_directory (see 'postconf -d' output)\fR"
178 The default location of the Postfix main.cf and master.cf
180 .IP "\fBberkeley_db_create_buffer_size (16777216)\fR"
181 The per-table I/O buffer size for programs that create Berkeley DB
182 hash or btree tables.
183 .IP "\fBberkeley_db_read_buffer_size (131072)\fR"
184 The per-table I/O buffer size for programs that read Berkeley DB
185 hash or btree tables.
186 .IP "\fBdefault_database_type (see 'postconf -d' output)\fR"
187 The default database type for use in \fBnewaliases\fR(1), \fBpostalias\fR(1)
188 and \fBpostmap\fR(1) commands.
189 .IP "\fBsyslog_facility (mail)\fR"
190 The syslog facility of Postfix logging.
191 .IP "\fBsyslog_name (see 'postconf -d' output)\fR"
192 The mail system name that is prepended to the process name in syslog
193 records, so that "smtpd" becomes, for example, "postfix/smtpd".
197 RFC 822 (ARPA Internet Text Messages)
201 aliases(5), format of alias database input file.
202 local(8), Postfix local delivery agent.
203 postconf(1), supported database types
204 postconf(5), configuration parameters
205 postmap(1), create/update/query lookup tables
206 newaliases(1), Sendmail compatibility interface.
207 syslogd(8), system logging
213 Use "\fBpostconf readme_directory\fR" or
214 "\fBpostconf html_directory\fR" to locate this information.
217 DATABASE_README, Postfix lookup table overview
223 The Secure Mailer license must be distributed with this software.
228 IBM T.J. Watson Research
230 Yorktown Heights, NY 10598, USA