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

NAME

6       postfix - Postfix control program
7

SYNOPSIS

9       postfix [-Dv] [-c config_dir] command
10

DESCRIPTION

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       logrotate
84              Rotate the logfile specified with $maillog_file, by appending  a
85              time-stamp   suffix   that  is  formatted  according  to  $mail‐
86              log_file_rotate_suffix, and by compressing  the  file  with  the
87              command  specified with $maillog_file_compressor.  This will not
88              rotate /dev/* files.
89
90              This feature is available in Postfix 3.4 and later.
91
92       tls subcommand
93              Enable opportunistic TLS in the Postfix SMTP client  or  server,
94              and  manage  Postfix  SMTP  server TLS private keys and certifi‐
95              cates.  See postfix-tls(1) for documentation.
96
97              This feature is available in Postfix 3.1 and later.
98
99       upgrade-configuration [name=value ...]
100              Update the main.cf and master.cf  files  with  information  that
101              Postfix  needs  in order to run: add or update services, and add
102              or update configuration parameter settings.
103
104              Specify name=value to override and update specific main.cf  con‐
105              figuration parameters.
106
107              This  feature is available in Postfix 2.1 and later.  With Post‐
108              fix  2.0  and   earlier,   use   "$config_directory/post-install
109              upgrade-configuration".
110
111       The following options are implemented:
112
113       -c config_dir
114              Read  the main.cf and master.cf configuration files in the named
115              directory instead of the default configuration  directory.   Use
116              this  to  distinguish  between multiple Postfix instances on the
117              same host.
118
119              With Postfix 2.6 and later, this option  forces  the  postfix(1)
120              command to operate on the specified Postfix instance only.  This
121              behavior is inherited by  postfix(1)  commands  that  run  as  a
122              descendant of the current process.
123
124       -D (with postfix start only)
125              Run each Postfix daemon under control of a debugger as specified
126              via the debugger_command configuration parameter.
127
128       -v     Enable verbose  logging  for  debugging  purposes.  Multiple  -v
129              options make the software increasingly verbose.
130

ENVIRONMENT

132       The  postfix(1)  command  exports  the  following environment variables
133       before executing the postfix-script file:
134
135       MAIL_CONFIG
136              This is set when the -c command-line option is present.
137
138              With Postfix 2.6 and later, this environment variable forces the
139              postfix(1)  command to operate on the specified Postfix instance
140              only.  This behavior is inherited by  postfix(1)  commands  that
141              run as a descendant of the current process.
142
143       MAIL_VERBOSE
144              This is set when the -v command-line option is present.
145
146       MAIL_DEBUG
147              This is set when the -D command-line option is present.
148
149       When  the  internal  logging service is enabled (by setting a non-empty
150       maillog_file parameter value) the postfix(1) command  exports  settings
151       that  are used by child processes before they have processed main.cf or
152       command-line settings.
153
154       POSTLOG_SERVICE
155              The name of the public postlog service endpoint.
156
157       POSTLOG_HOSTNAME
158              The hostname to prepend to internal logging.
159

CONFIGURATION PARAMETERS

161       The following main.cf configuration parameters are exported as environ‐
162       ment variables with the same names:
163
164       config_directory (see 'postconf -d' output)
165              The  default  location of the Postfix main.cf and master.cf con‐
166              figuration files.
167
168       command_directory (see 'postconf -d' output)
169              The location of all postfix administrative commands.
170
171       daemon_directory (see 'postconf -d' output)
172              The directory with Postfix support programs and daemon programs.
173
174       html_directory (see 'postconf -d' output)
175              The location of Postfix HTML files that describe how  to  build,
176              configure or operate a specific Postfix subsystem or feature.
177
178       mail_owner (postfix)
179              The  UNIX  system  account  that owns the Postfix queue and most
180              Postfix daemon processes.
181
182       mailq_path (see 'postconf -d' output)
183              Sendmail compatibility feature that specifies where the  Postfix
184              mailq(1) command is installed.
185
186       manpage_directory (see 'postconf -d' output)
187              Where the Postfix manual pages are installed.
188
189       newaliases_path (see 'postconf -d' output)
190              Sendmail  compatibility  feature  that specifies the location of
191              the newaliases(1) command.
192
193       queue_directory (see 'postconf -d' output)
194              The location of the Postfix top-level queue directory.
195
196       readme_directory (see 'postconf -d' output)
197              The location of Postfix README files that describe how to build,
198              configure or operate a specific Postfix subsystem or feature.
199
200       sendmail_path (see 'postconf -d' output)
201              A  Sendmail compatibility feature that specifies the location of
202              the Postfix sendmail(1) command.
203
204       setgid_group (postdrop)
205              The  group  ownership  of  set-gid  Postfix  commands   and   of
206              group-writable Postfix directories.
207
208       Available in Postfix version 2.5 and later:
209
210       data_directory (see 'postconf -d' output)
211              The  directory  with  Postfix-writable  data files (for example:
212              caches, pseudo-random numbers).
213
214       Available in Postfix version 3.0 and later:
215
216       meta_directory (see 'postconf -d' output)
217              The location of non-executable files that are shared among  mul‐
218              tiple  Postfix instances, such as postfix-files, dynamicmaps.cf,
219              and the multi-instance template  files  main.cf.proto  and  mas‐
220              ter.cf.proto.
221
222       shlib_directory (see 'postconf -d' output)
223              The  location  of Postfix dynamically-linked libraries (libpost‐
224              fix-*.so), and the default location of Postfix database  plugins
225              (postfix-*.so)  that  have  a  relative  pathname  in the dynam‐
226              icmaps.cf file.
227
228       Available in Postfix version 3.1 and later:
229
230       openssl_path (openssl)
231              The location of the OpenSSL command line program openssl(1).
232
233       Other configuration parameters:
234
235       import_environment (see 'postconf -d' output)
236              The list of environment parameters  that  a  privileged  Postfix
237              process  will  import  from  a  non-Postfix  parent  process, or
238              name=value environment overrides.
239
240       syslog_facility (mail)
241              The syslog facility of Postfix logging.
242
243       syslog_name (see 'postconf -d' output)
244              A prefix that  is  prepended  to  the  process  name  in  syslog
245              records, so that, for example, "smtpd" becomes "prefix/smtpd".
246
247       Available in Postfix version 2.6 and later:
248
249       multi_instance_directories (empty)
250              An  optional  list of non-default Postfix configuration directo‐
251              ries; these directories belong to additional  Postfix  instances
252              that  share  the Postfix executable files and documentation with
253              the default Postfix instance, and  that  are  started,  stopped,
254              etc., together with the default Postfix instance.
255
256       multi_instance_wrapper (empty)
257              The  pathname of a multi-instance manager command that the post‐
258              fix(1)  command  invokes  when  the   multi_instance_directories
259              parameter value is non-empty.
260
261       multi_instance_group (empty)
262              The optional instance group name of this Postfix instance.
263
264       multi_instance_name (empty)
265              The optional instance name of this Postfix instance.
266
267       multi_instance_enable (no)
268              Allow  this  Postfix instance to be started, stopped, etc., by a
269              multi-instance manager.
270
271       Available in Postfix version 3.4 and later:
272
273       maillog_file (empty)
274              The name of an optional logfile that is written by  the  Postfix
275              postlogd(8) service.
276
277       maillog_file_compressor (gzip)
278              The  program  to  run after rotating $maillog_file with "postfix
279              logrotate".
280
281       maillog_file_prefixes (/var, /dev/stdout)
282              A list of allowed prefixes for a maillog_file value.
283
284       maillog_file_rotate_suffix (%Y%M%d-%H%M%S)
285              The format of the suffix to append to $maillog_file while rotat‐
286              ing the file with "postfix logrotate".
287
288       postlog_service_name (postlog)
289              The name of the postlogd(8) service entry in master.cf.
290

FILES

292       Prior  to Postfix version 2.6, all of the following files were in $con‐
293       fig_directory. Some files are now in $daemon_directory so that they can
294       be shared among multiple instances that run the same Postfix version.
295
296       Use  the command "postconf config_directory" or "postconf daemon_direc‐
297       tory" to expand the names into their actual values.
298
299       $config_directory/main.cf, Postfix configuration parameters
300       $config_directory/master.cf, Postfix daemon processes
301       $daemon_directory/postfix-files, file/directory permissions
302       $daemon_directory/postfix-script, administrative commands
303       $daemon_directory/post-install, post-installation configuration
304       $daemon_directory/dynamicmaps.cf, plug-in database clients
305

SEE ALSO

307       Commands:
308       postalias(1), create/update/query alias database
309       postcat(1), examine Postfix queue file
310       postconf(1), Postfix configuration utility
311       postfix(1), Postfix control program
312       postfix-tls(1), Postfix TLS management
313       postkick(1), trigger Postfix daemon
314       postlock(1), Postfix-compatible locking
315       postlog(1), Postfix-compatible logging
316       postmap(1), Postfix lookup table manager
317       postmulti(1), Postfix multi-instance manager
318       postqueue(1), Postfix mail queue control
319       postsuper(1), Postfix housekeeping
320       mailq(1), Sendmail compatibility interface
321       newaliases(1), Sendmail compatibility interface
322       sendmail(1), Sendmail compatibility interface
323
324       Postfix configuration:
325       bounce(5), Postfix bounce message templates
326       master(5), Postfix master.cf file syntax
327       postconf(5), Postfix main.cf file syntax
328       postfix-wrapper(5), Postfix multi-instance API
329
330       Table-driven mechanisms:
331       access(5), Postfix SMTP access control table
332       aliases(5), Postfix alias database
333       canonical(5), Postfix input address rewriting
334       generic(5), Postfix output address rewriting
335       header_checks(5), body_checks(5), Postfix content inspection
336       relocated(5), Users that have moved
337       transport(5), Postfix routing table
338       virtual(5), Postfix virtual aliasing
339
340       Table lookup mechanisms:
341       cidr_table(5), Associate CIDR pattern with value
342       ldap_table(5), Postfix LDAP client
343       lmdb_table(5), Postfix LMDB database driver
344       memcache_table(5), Postfix memcache client
345       mysql_table(5), Postfix MYSQL client
346       nisplus_table(5), Postfix NIS+ client
347       pcre_table(5), Associate PCRE pattern with value
348       pgsql_table(5), Postfix PostgreSQL client
349       regexp_table(5), Associate POSIX regexp pattern with value
350       socketmap_table(5), Postfix socketmap client
351       sqlite_table(5), Postfix SQLite database driver
352       tcp_table(5), Postfix client-server table lookup
353
354       Daemon processes:
355       anvil(8), Postfix connection/rate limiting
356       bounce(8), defer(8), trace(8), Delivery status reports
357       cleanup(8), canonicalize and enqueue message
358       discard(8), Postfix discard delivery agent
359       dnsblog(8), DNS black/whitelist logger
360       error(8), Postfix error delivery agent
361       flush(8), Postfix fast ETRN service
362       local(8), Postfix local delivery agent
363       master(8), Postfix master daemon
364       oqmgr(8), old Postfix queue manager
365       pickup(8), Postfix local mail pickup
366       pipe(8), deliver mail to non-Postfix command
367       postlogd(8), Postfix internal logging service
368       postscreen(8), Postfix zombie blocker
369       proxymap(8), Postfix lookup table proxy server
370       qmgr(8), Postfix queue manager
371       qmqpd(8), Postfix QMQP server
372       scache(8), Postfix connection cache manager
373       showq(8), list Postfix mail queue
374       smtp(8), lmtp(8), Postfix SMTP+LMTP client
375       smtpd(8), Postfix SMTP server
376       spawn(8), run non-Postfix server
377       tlsmgr(8), Postfix TLS cache and randomness manager
378       tlsproxy(8), Postfix TLS proxy server
379       trivial-rewrite(8), Postfix address rewriting
380       verify(8), Postfix address verification
381       virtual(8), Postfix virtual delivery agent
382
383       Other:
384       syslogd(8), system logging
385

README FILES

387       Use "postconf readme_directory" or "postconf html_directory" to  locate
388       this information.
389       OVERVIEW, overview of Postfix commands and processes
390       BASIC_CONFIGURATION_README, Postfix basic configuration
391       ADDRESS_REWRITING_README, Postfix address rewriting
392       SMTPD_ACCESS_README, SMTP relay/access control
393       CONTENT_INSPECTION_README, Postfix content inspection
394       QSHAPE_README, Postfix queue analysis
395

LICENSE

397       The Secure Mailer license must be distributed with this software.
398

AUTHOR(S)

400       Wietse Venema
401       IBM T.J. Watson Research
402       P.O. Box 704
403       Yorktown Heights, NY 10598, USA
404
405       Wietse Venema
406       Google, Inc.
407       111 8th Avenue
408       New York, NY 10011, USA
409
410       TLS support by:
411       Lutz Jaenicke
412       Brandenburg University of Technology
413       Cottbus, Germany
414
415       Victor Duchovni
416       Morgan Stanley
417
418       SASL support originally by:
419       Till Franke
420       SuSE Rhein/Main AG
421       65760 Eschborn, Germany
422
423       LMTP support originally by:
424       Philip A. Prindeville
425       Mirapoint, Inc.
426       USA.
427
428       Amos Gouaux
429       University of Texas at Dallas
430       P.O. Box 830688, MC34
431       Richardson, TX 75083, USA
432
433       IPv6 support originally by:
434       Mark Huizer, Eindhoven University, The Netherlands
435       Jun-ichiro 'itojun' Hagino, KAME project, Japan
436       The Linux PLD project
437       Dean Strik, Eindhoven University, The Netherlands
438
439
440
441                                                                    POSTFIX(1)
Impressum