postfix — Postfix control program
| Use Case | Command | Description |
|---|---|---|
| 🔍 Check configuration | postfix check | Warn about bad directory/file ownership/permissions, create missing directories |
| ▶️ Start Postfix | postfix start | Start the Postfix mail system (also runs config check) |
| 🛑 Stop Postfix | postfix stop | Orderly shutdown of the Postfix mail system |
| 🔄 Reload config | postfix reload | Re-read configuration files without full stop/start |
| 📊 Check status | postfix status | Indicate if Postfix is currently running |
| 📬 Flush deferred queue | postfix flush | Force delivery attempt for every message in the deferred queue |
| ⚠️ Abort immediately | postfix abort | Stop all Postfix processes abruptly |
| 🔐 TLS management | postfix tls | Enable opportunistic TLS, manage keys/certificates |
| 🆕 Upgrade configuration | postfix upgrade-configuration | Update main.cf and master.cf with required settings |
| 📋 Set permissions | postfix set-permissions | Set ownership/permissions of Postfix files/directories |
postfix [-Dv] [-c config_dir] command
This command is reserved for the superuser. To submit mail, use the Postfix sendmail(1) command.
The postfix(1) command controls the operation of the Postfix mail system: start or stop the master(8) daemon, do a health check, and other maintenance.
By default, the postfix(1) command sets up a standardized environment and runs the postfix-script shell script to do the actual work.
However, when support for multiple Postfix instances is configured, postfix(1) executes the command specified with the multi_instance_wrapper configuration parameter. This command will execute the command for each applicable Postfix instance.
multi_instance_directories parameter value must be empty).docker run -v /dev/log:/dev/log ...), and c) a distinct Postfix syslog_name prefix that identifies logging from the Postfix instance.mail_owner or setgid_group setting for an already installed Postfix system.$config_directory/post-install set-permissions.$maillog_file, by appending a time-stamp suffix that is formatted according to $maillog_file_rotate_suffix, and by compressing the file with the command specified with $maillog_file_compressor. This will not rotate /dev/* files.$config_directory/post-install upgrade-configuration.debugger_command configuration parameter.The postfix(1) command exports the following environment variables before executing the postfix-script file:
When the internal logging service is enabled (by setting a non-empty maillog_file parameter value) the postfix(1) command exports settings that are used by child processes before they have processed main.cf or command-line settings.
The following main.cf configuration parameters are exported as environment variables with the same names:
config_directory (see 'postconf -d' output) — The default location of the Postfix main.cf and master.cf configuration files.command_directory (see 'postconf -d' output) — The location of all postfix administrative commands.daemon_directory (see 'postconf -d' output) — The directory with Postfix support programs and daemon programs.html_directory (see 'postconf -d' output) — The location of Postfix HTML files that describe how to build, configure or operate a specific Postfix subsystem or feature.mail_owner (postfix) — The UNIX system account that owns the Postfix queue and most Postfix daemon processes.mailq_path (see 'postconf -d' output) — Sendmail compatibility feature that specifies where the Postfix mailq(1) command is installed.manpage_directory (see 'postconf -d' output) — Where the Postfix manual pages are installed.newaliases_path (see 'postconf -d' output) — Sendmail compatibility feature that specifies the location of the newaliases(1) command.queue_directory (see 'postconf -d' output) — The location of the Postfix top-level queue directory.readme_directory (see 'postconf -d' output) — The location of Postfix README files that describe how to build, configure or operate a specific Postfix subsystem or feature.sendmail_path (see 'postconf -d' output) — A Sendmail compatibility feature that specifies the location of the Postfix sendmail(1) command.setgid_group (postdrop) — The group ownership of set-gid Postfix commands and of group-writable Postfix directories.Available in Postfix version 2.5 and later:
data_directory (see 'postconf -d' output) — The directory with Postfix-writable data files (for example: caches, pseudo-random numbers).Available in Postfix version 3.0 and later:
compatibility_level (0) — A safety net that causes Postfix to run with backwards-compatible default settings after an upgrade to a newer Postfix version.meta_directory (see 'postconf -d' output) — The location of non-executable files that are shared among multiple Postfix instances, such as postfix-files, dynamicmaps.cf, and the multi-instance template files main.cf.proto and master.cf.proto.shlib_directory (see 'postconf -d' output) — The location of Postfix dynamically-linked libraries (libpostfix-*.so), and the default location of Postfix database plugins (postfix-*.so) that have a relative pathname in the dynamicmaps.cf file.Available in Postfix version 3.1 and later:
openssl_path (openssl) — The location of the OpenSSL command line program openssl(1).Other configuration parameters:
import_environment (see 'postconf -d' output) — The list of environment parameters that a privileged Postfix process will import from a non-Postfix parent process, or name=value environment overrides.syslog_facility (mail) — The syslog facility of Postfix logging.syslog_name (see 'postconf -d' output) — A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd".Available in Postfix version 2.6 and later:
multi_instance_directories (empty) — An optional list of non-default Postfix configuration directories; these directories belong to additional Postfix instances that share the Postfix executable files and documentation with the default Postfix instance, and that are started, stopped, etc., together with the default Postfix instance.multi_instance_wrapper (empty) — The pathname of a multi-instance manager command that the postfix(1) command invokes when the multi_instance_directories parameter value is non-empty.multi_instance_group (empty) — The optional instance group name of this Postfix instance.multi_instance_name (empty) — The optional instance name of this Postfix instance.multi_instance_enable (no) — Allow this Postfix instance to be started, stopped, etc., by a multi-instance manager.Available in Postfix version 3.4 and later:
maillog_file (empty) — The name of an optional logfile that is written by the Postfix postlogd(8) service.maillog_file_compressor (gzip) — The program to run after rotating $maillog_file with "postfix logrotate".maillog_file_prefixes (/var, /dev/stdout) — A list of allowed prefixes for a maillog_file value.maillog_file_rotate_suffix (%Y%m%d-%H%M%S) — The format of the suffix to append to $maillog_file while rotating the file with "postfix logrotate".postlog_service_name (postlog) — The name of the postlogd(8) service entry in master.cf.Prior to Postfix version 2.6, all of the following files were in $config_directory. Some files are now in $daemon_directory or $meta_directory so that they can be shared among multiple instances that run the same Postfix version.
Use the command "postconf config_directory" or "postconf daemon_directory" to expand the names into their actual values.
$config_directory/main.cf — Postfix configuration parameters$config_directory/master.cf — Postfix daemon processes$daemon_directory/postfix-script — administrative commands$daemon_directory/post-install — post-installation configuration$meta_directory/dynamicmaps.cf — plug-in database clients$meta_directory/postfix-files — file/directory permissionsUse "postconf readme_directory" or "postconf html_directory" to locate this information.
The Secure Mailer license must be distributed with this software.
Wietse Venema
IBM T.J. Watson Research
P.O. Box 704
Yorktown Heights, NY 10598, USA
Wietse Venema
Google, Inc.
111 8th Avenue
New York, NY 10011, USA
TLS support by:
Lutz Jaenicke
Brandenburg University of Technology
Cottbus, Germany
Victor Duchovni
Morgan Stanley
SASL support originally by:
Till Franke
SuSE Rhein/Main AG
65760 Eschborn, Germany
LMTP support originally by:
Philip A. Prindeville
Mirapoint, Inc.
USA.
Amos Gouaux
University of Texas at Dallas
P.O. Box 830688, MC34
Richardson, TX 75083, USA
IPv6 support originally by:
Mark Huizer, Eindhoven University, The Netherlands
Jun-ichiro 'itojun' Hagino, KAME project, Japan
The Linux PLD project
Dean Strik, Eindhoven University, The Netherlands
Generated by phpman v4.9.26-1-g511901d Author: Che Dong Under GNU General Public License
2026-08-08 12:32 @216.73.216.150
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format