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).
41
42              When running Postfix inside a container, see MAILLOG_README  for
43              logging  to stdout. Postfix logs to syslog by default, which re‐
44              quires a) running a syslogd process inside the container, or  b)
45              mounting  the  container  host's /dev/log socket inside the con‐
46              tainer (example: "docker run -v /dev/log:/dev/log ..."), and  c)
47              a  distinct Postfix "syslog_name" prefix that identifies logging
48              from the Postfix instance.
49
50       stop   Stop the Postfix mail system in an orderly fashion. If possible,
51              running  processes  are  allowed  to terminate at their earliest
52              convenience.
53
54              Note: in order to refresh the Postfix mail system after  a  con‐
55              figuration  change,  do  not  use the start and stop commands in
56              succession. Use the reload command instead.
57
58       abort  Stop the Postfix mail system  abruptly.  Running  processes  are
59              signaled to stop immediately.
60
61       flush  Force delivery: attempt to deliver every message in the deferred
62              mail queue. Normally, attempts to deliver delayed mail happen at
63              regular  intervals,  the interval doubling after each failed at‐
64              tempt.
65
66              Warning: flushing undeliverable mail frequently will  result  in
67              poor delivery performance of all other mail.
68
69       reload Re-read  configuration  files.  Running  processes  terminate at
70              their earliest convenience.
71
72       status Indicate if the Postfix mail system is currently running.
73
74       set-permissions [name=value ...]
75              Set the ownership and permissions of Postfix related  files  and
76              directories, as specified in the postfix-files file.
77
78              Specify  name=value to override and update specific main.cf con‐
79              figuration parameters. Use this,  for  example,  to  change  the
80              mail_owner  or  setgid_group  setting  for  an already installed
81              Postfix system.
82
83              This feature is available in Postfix 2.1 and later.  With  Post‐
84              fix   2.0   and   earlier,  use  "$config_directory/post-install
85              set-permissions".
86
87       logrotate
88              Rotate the logfile specified with $maillog_file, by appending  a
89              time-stamp   suffix   that  is  formatted  according  to  $mail‐
90              log_file_rotate_suffix, and by compressing  the  file  with  the
91              command  specified with $maillog_file_compressor.  This will not
92              rotate /dev/* files.
93
94              This feature is available in Postfix 3.4 and later.
95
96       tls subcommand
97              Enable opportunistic TLS in the Postfix SMTP client  or  server,
98              and  manage  Postfix  SMTP  server TLS private keys and certifi‐
99              cates.  See postfix-tls(1) for documentation.
100
101              This feature is available in Postfix 3.1 and later.
102
103       upgrade-configuration [name=value ...]
104              Update the main.cf and master.cf  files  with  information  that
105              Postfix  needs  in order to run: add or update services, and add
106              or update configuration parameter settings.
107
108              Specify name=value to override and update specific main.cf  con‐
109              figuration parameters.
110
111              This  feature is available in Postfix 2.1 and later.  With Post‐
112              fix 2.0 and  earlier,  use  "$config_directory/post-install  up‐
113              grade-configuration".
114
115       The following options are implemented:
116
117       -c config_dir
118              Read  the main.cf and master.cf configuration files in the named
119              directory instead of the default configuration  directory.   Use
120              this  to  distinguish  between multiple Postfix instances on the
121              same host.
122
123              With Postfix 2.6 and later, this option  forces  the  postfix(1)
124              command to operate on the specified Postfix instance only.  This
125              behavior is inherited by postfix(1) commands that run as  a  de‐
126              scendant of the current process.
127
128       -D (with postfix start only)
129              Run each Postfix daemon under control of a debugger as specified
130              via the debugger_command configuration parameter.
131
132       -v     Enable verbose logging for debugging purposes. Multiple  -v  op‐
133              tions make the software increasingly verbose.
134

ENVIRONMENT

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

CONFIGURATION PARAMETERS

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

FILES

301       Prior  to Postfix version 2.6, all of the following files were in $con‐
302       fig_directory. Some files are now in $daemon_directory or  $meta_direc‐
303       tory  so  that they can be shared among multiple instances that run the
304       same Postfix version.
305
306       Use the command "postconf config_directory" or "postconf  daemon_direc‐
307       tory" to expand the names into their actual values.
308
309       $config_directory/main.cf, Postfix configuration parameters
310       $config_directory/master.cf, Postfix daemon processes
311       $daemon_directory/postfix-script, administrative commands
312       $daemon_directory/post-install, post-installation configuration
313       $meta_directory/dynamicmaps.cf, plug-in database clients
314       $meta_directory/postfix-files, file/directory permissions
315

SEE ALSO

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

README FILES

397       Use  "postconf readme_directory" or "postconf html_directory" to locate
398       this information.
399       OVERVIEW, overview of Postfix commands and processes
400       BASIC_CONFIGURATION_README, Postfix basic configuration
401       ADDRESS_REWRITING_README, Postfix address rewriting
402       SMTPD_ACCESS_README, SMTP relay/access control
403       CONTENT_INSPECTION_README, Postfix content inspection
404       QSHAPE_README, Postfix queue analysis
405

LICENSE

407       The Secure Mailer license must be distributed with this software.
408

AUTHOR(S)

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