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

ENVIRONMENT

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

CONFIGURATION PARAMETERS

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

FILES

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

SEE ALSO

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

README FILES

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

LICENSE

409       The Secure Mailer license must be distributed with this software.
410

AUTHOR(S)

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