1POSTFIX(1) General Commands Manual POSTFIX(1)
2
3
4
6 postfix - Postfix control program
7
9 postfix [-Dv] [-c config_dir] command
10
12 This command is reserved for the superuser. To submit mail, use the
13 Postfix sendmail(1) command.
14
15 The postfix(1) command controls the operation of the Postfix mail sys‐
16 tem: start or stop the master(8) daemon, do a health check, and other
17 maintenance.
18
19 By default, the postfix(1) command sets up a standardized environment
20 and runs the postfix-script shell script to do the actual work.
21
22 However, when support for multiple Postfix instances is configured,
23 postfix(1) executes the command specified with the multi_instance_wrap‐
24 per configuration parameter. This command will execute the command for
25 each applicable Postfix instance.
26
27 The following commands are implemented:
28
29 check Warn about bad directory/file ownership or permissions, and cre‐
30 ate missing directories.
31
32 start Start the Postfix mail system. This also runs the configuration
33 check described above.
34
35 start-fg
36 Like start, but keep the master(8) daemon running in the fore‐
37 ground, and enable master(8) "init" mode when running as PID 1.
38 This command requires that multi-instance support is disabled
39 (i.e. the multi_instance_directories parameter value must be
40 empty). When running Postfix inside a container, mount the con‐
41 tainer host's /dev/log socket inside the container (example:
42 "docker run -v /dev/log:/dev/log ...") and specify a distinct
43 Postfix "syslog_name" prefix that identifies logging from the
44 Postfix instance.
45
46 stop Stop the Postfix mail system in an orderly fashion. If possible,
47 running processes are allowed to terminate at their earliest
48 convenience.
49
50 Note: in order to refresh the Postfix mail system after a con‐
51 figuration change, do not use the start and stop commands in
52 succession. Use the reload command instead.
53
54 abort Stop the Postfix mail system abruptly. Running processes are
55 signaled to stop immediately.
56
57 flush Force delivery: attempt to deliver every message in the deferred
58 mail queue. Normally, attempts to deliver delayed mail happen at
59 regular intervals, the interval doubling after each failed
60 attempt.
61
62 Warning: flushing undeliverable mail frequently will result in
63 poor delivery performance of all other mail.
64
65 reload Re-read configuration files. Running processes terminate at
66 their earliest convenience.
67
68 status Indicate if the Postfix mail system is currently running.
69
70 set-permissions [name=value ...]
71 Set the ownership and permissions of Postfix related files and
72 directories, as specified in the postfix-files file.
73
74 Specify name=value to override and update specific main.cf con‐
75 figuration parameters. Use this, for example, to change the
76 mail_owner or setgid_group setting for an already installed
77 Postfix system.
78
79 This feature is available in Postfix 2.1 and later. With Post‐
80 fix 2.0 and earlier, use "$config_directory/post-install
81 set-permissions".
82
83 tls subcommand
84 Enable opportunistic TLS in the Postfix SMTP client or server,
85 and manage Postfix SMTP server TLS private keys and certifi‐
86 cates. See postfix-tls(1) for documentation.
87
88 This feature is available in Postfix 3.1 and later.
89
90 upgrade-configuration [name=value ...]
91 Update the main.cf and master.cf files with information that
92 Postfix needs in order to run: add or update services, and add
93 or update configuration parameter settings.
94
95 Specify name=value to override and update specific main.cf con‐
96 figuration parameters.
97
98 This feature is available in Postfix 2.1 and later. With Post‐
99 fix 2.0 and earlier, use "$config_directory/post-install
100 upgrade-configuration".
101
102 The following options are implemented:
103
104 -c config_dir
105 Read the main.cf and master.cf configuration files in the named
106 directory instead of the default configuration directory. Use
107 this to distinguish between multiple Postfix instances on the
108 same host.
109
110 With Postfix 2.6 and later, this option forces the postfix(1)
111 command to operate on the specified Postfix instance only. This
112 behavior is inherited by postfix(1) commands that run as a
113 descendant of the current process.
114
115 -D (with postfix start only)
116 Run each Postfix daemon under control of a debugger as specified
117 via the debugger_command configuration parameter.
118
119 -v Enable verbose logging for debugging purposes. Multiple -v
120 options make the software increasingly verbose.
121
123 The postfix(1) command exports the following environment variables
124 before executing the postfix-script file:
125
126 MAIL_CONFIG
127 This is set when the -c command-line option is present.
128
129 With Postfix 2.6 and later, this environment variable forces the
130 postfix(1) command to operate on the specified Postfix instance
131 only. This behavior is inherited by postfix(1) commands that
132 run as a descendant of the current process.
133
134 MAIL_VERBOSE
135 This is set when the -v command-line option is present.
136
137 MAIL_DEBUG
138 This is set when the -D command-line option is present.
139
141 The following main.cf configuration parameters are exported as environ‐
142 ment variables with the same names:
143
144 config_directory (see 'postconf -d' output)
145 The default location of the Postfix main.cf and master.cf con‐
146 figuration files.
147
148 command_directory (see 'postconf -d' output)
149 The location of all postfix administrative commands.
150
151 daemon_directory (see 'postconf -d' output)
152 The directory with Postfix support programs and daemon programs.
153
154 html_directory (see 'postconf -d' output)
155 The location of Postfix HTML files that describe how to build,
156 configure or operate a specific Postfix subsystem or feature.
157
158 mail_owner (postfix)
159 The UNIX system account that owns the Postfix queue and most
160 Postfix daemon processes.
161
162 mailq_path (see 'postconf -d' output)
163 Sendmail compatibility feature that specifies where the Postfix
164 mailq(1) command is installed.
165
166 manpage_directory (see 'postconf -d' output)
167 Where the Postfix manual pages are installed.
168
169 newaliases_path (see 'postconf -d' output)
170 Sendmail compatibility feature that specifies the location of
171 the newaliases(1) command.
172
173 queue_directory (see 'postconf -d' output)
174 The location of the Postfix top-level queue directory.
175
176 readme_directory (see 'postconf -d' output)
177 The location of Postfix README files that describe how to build,
178 configure or operate a specific Postfix subsystem or feature.
179
180 sendmail_path (see 'postconf -d' output)
181 A Sendmail compatibility feature that specifies the location of
182 the Postfix sendmail(1) command.
183
184 setgid_group (postdrop)
185 The group ownership of set-gid Postfix commands and of
186 group-writable Postfix directories.
187
188 Available in Postfix version 2.5 and later:
189
190 data_directory (see 'postconf -d' output)
191 The directory with Postfix-writable data files (for example:
192 caches, pseudo-random numbers).
193
194 Available in Postfix version 3.0 and later:
195
196 meta_directory (see 'postconf -d' output)
197 The location of non-executable files that are shared among mul‐
198 tiple Postfix instances, such as postfix-files, dynamicmaps.cf,
199 and the multi-instance template files main.cf.proto and mas‐
200 ter.cf.proto.
201
202 shlib_directory (see 'postconf -d' output)
203 The location of Postfix dynamically-linked libraries (libpost‐
204 fix-*.so), and the default location of Postfix database plugins
205 (postfix-*.so) that have a relative pathname in the dynam‐
206 icmaps.cf file.
207
208 Available in Postfix version 3.1 and later:
209
210 openssl_path (openssl)
211 The location of the OpenSSL command line program openssl(1).
212
213 Other configuration parameters:
214
215 import_environment (see 'postconf -d' output)
216 The list of environment parameters that a privileged Postfix
217 process will import from a non-Postfix parent process, or
218 name=value environment overrides.
219
220 syslog_facility (mail)
221 The syslog facility of Postfix logging.
222
223 syslog_name (see 'postconf -d' output)
224 A prefix that is prepended to the process name in syslog
225 records, so that, for example, "smtpd" becomes "prefix/smtpd".
226
227 Available in Postfix version 2.6 and later:
228
229 multi_instance_directories (empty)
230 An optional list of non-default Postfix configuration directo‐
231 ries; these directories belong to additional Postfix instances
232 that share the Postfix executable files and documentation with
233 the default Postfix instance, and that are started, stopped,
234 etc., together with the default Postfix instance.
235
236 multi_instance_wrapper (empty)
237 The pathname of a multi-instance manager command that the post‐
238 fix(1) command invokes when the multi_instance_directories
239 parameter value is non-empty.
240
241 multi_instance_group (empty)
242 The optional instance group name of this Postfix instance.
243
244 multi_instance_name (empty)
245 The optional instance name of this Postfix instance.
246
247 multi_instance_enable (no)
248 Allow this Postfix instance to be started, stopped, etc., by a
249 multi-instance manager.
250
252 Prior to Postfix version 2.6, all of the following files were in $con‐
253 fig_directory. Some files are now in $daemon_directory so that they can
254 be shared among multiple instances that run the same Postfix version.
255
256 Use the command "postconf config_directory" or "postconf daemon_direc‐
257 tory" to expand the names into their actual values.
258
259 $config_directory/main.cf, Postfix configuration parameters
260 $config_directory/master.cf, Postfix daemon processes
261 $daemon_directory/postfix-files, file/directory permissions
262 $daemon_directory/postfix-script, administrative commands
263 $daemon_directory/post-install, post-installation configuration
264 $daemon_directory/dynamicmaps.cf, plug-in database clients
265
267 Commands:
268 postalias(1), create/update/query alias database
269 postcat(1), examine Postfix queue file
270 postconf(1), Postfix configuration utility
271 postfix(1), Postfix control program
272 postfix-tls(1), Postfix TLS management
273 postkick(1), trigger Postfix daemon
274 postlock(1), Postfix-compatible locking
275 postlog(1), Postfix-compatible logging
276 postmap(1), Postfix lookup table manager
277 postmulti(1), Postfix multi-instance manager
278 postqueue(1), Postfix mail queue control
279 postsuper(1), Postfix housekeeping
280 mailq(1), Sendmail compatibility interface
281 newaliases(1), Sendmail compatibility interface
282 sendmail(1), Sendmail compatibility interface
283
284 Postfix configuration:
285 bounce(5), Postfix bounce message templates
286 master(5), Postfix master.cf file syntax
287 postconf(5), Postfix main.cf file syntax
288 postfix-wrapper(5), Postfix multi-instance API
289
290 Table-driven mechanisms:
291 access(5), Postfix SMTP access control table
292 aliases(5), Postfix alias database
293 canonical(5), Postfix input address rewriting
294 generic(5), Postfix output address rewriting
295 header_checks(5), body_checks(5), Postfix content inspection
296 relocated(5), Users that have moved
297 transport(5), Postfix routing table
298 virtual(5), Postfix virtual aliasing
299
300 Table lookup mechanisms:
301 cidr_table(5), Associate CIDR pattern with value
302 ldap_table(5), Postfix LDAP client
303 lmdb_table(5), Postfix LMDB database driver
304 memcache_table(5), Postfix memcache client
305 mysql_table(5), Postfix MYSQL client
306 nisplus_table(5), Postfix NIS+ client
307 pcre_table(5), Associate PCRE pattern with value
308 pgsql_table(5), Postfix PostgreSQL client
309 regexp_table(5), Associate POSIX regexp pattern with value
310 socketmap_table(5), Postfix socketmap client
311 sqlite_table(5), Postfix SQLite database driver
312 tcp_table(5), Postfix client-server table lookup
313
314 Daemon processes:
315 anvil(8), Postfix connection/rate limiting
316 bounce(8), defer(8), trace(8), Delivery status reports
317 cleanup(8), canonicalize and enqueue message
318 discard(8), Postfix discard delivery agent
319 dnsblog(8), DNS black/whitelist logger
320 error(8), Postfix error delivery agent
321 flush(8), Postfix fast ETRN service
322 local(8), Postfix local delivery agent
323 master(8), Postfix master daemon
324 oqmgr(8), old Postfix queue manager
325 pickup(8), Postfix local mail pickup
326 pipe(8), deliver mail to non-Postfix command
327 postscreen(8), Postfix zombie blocker
328 proxymap(8), Postfix lookup table proxy server
329 qmgr(8), Postfix queue manager
330 qmqpd(8), Postfix QMQP server
331 scache(8), Postfix connection cache manager
332 showq(8), list Postfix mail queue
333 smtp(8), lmtp(8), Postfix SMTP+LMTP client
334 smtpd(8), Postfix SMTP server
335 spawn(8), run non-Postfix server
336 tlsmgr(8), Postfix TLS cache and randomness manager
337 tlsproxy(8), Postfix TLS proxy server
338 trivial-rewrite(8), Postfix address rewriting
339 verify(8), Postfix address verification
340 virtual(8), Postfix virtual delivery agent
341
342 Other:
343 syslogd(8), system logging
344
346 Use "postconf readme_directory" or "postconf html_directory" to locate
347 this information.
348 OVERVIEW, overview of Postfix commands and processes
349 BASIC_CONFIGURATION_README, Postfix basic configuration
350 ADDRESS_REWRITING_README, Postfix address rewriting
351 SMTPD_ACCESS_README, SMTP relay/access control
352 CONTENT_INSPECTION_README, Postfix content inspection
353 QSHAPE_README, Postfix queue analysis
354
356 The Secure Mailer license must be distributed with this software.
357
359 Wietse Venema
360 IBM T.J. Watson Research
361 P.O. Box 704
362 Yorktown Heights, NY 10598, USA
363
364 Wietse Venema
365 Google, Inc.
366 111 8th Avenue
367 New York, NY 10011, USA
368
369 TLS support by:
370 Lutz Jaenicke
371 Brandenburg University of Technology
372 Cottbus, Germany
373
374 Victor Duchovni
375 Morgan Stanley
376
377 SASL support originally by:
378 Till Franke
379 SuSE Rhein/Main AG
380 65760 Eschborn, Germany
381
382 LMTP support originally by:
383 Philip A. Prindeville
384 Mirapoint, Inc.
385 USA.
386
387 Amos Gouaux
388 University of Texas at Dallas
389 P.O. Box 830688, MC34
390 Richardson, TX 75083, USA
391
392 IPv6 support originally by:
393 Mark Huizer, Eindhoven University, The Netherlands
394 Jun-ichiro 'itojun' Hagino, KAME project, Japan
395 The Linux PLD project
396 Dean Strik, Eindhoven University, The Netherlands
397
398
399
400 POSTFIX(1)