postfix - Postfix control program
postfix [-Dv] [-c config_dir] command
Controls the operation of the Postfix mail system: start or stop the master(8) daemon, do a
health check, and other maintenance.
reserved for the superuser. To submit mail, use the Postfix sendmail(1) command.
Sets up a standardized environment and runs the postfix-script shell script to do the actual work.
When support for multiple Postfix instances is configured, executes the command specified with the
multi_instance_wrapper configuration parameter, for each applicable Postfix instance.
check Warn about bad directory/file ownership or permissions, and create missing directories.
| start
| stop orderly fashion. If possible, running processes are allowed to terminate at their earliest convenience.
Do not use start ; stop to change configuration, use reload
| abort Stop the Postfix mail system abruptly. Running processes are signaled to stop immediately.
| flush Force delivery: attempt to deliver every message in the deferred mail queue. Normally, attempts to deliver
delayed mail happen at regular intervals, the interval doubling after each failed attempt.
Warning: flushing undeliverable mail frequently will result in poor delivery performance of all other mail.
| reload Re-read configuration files. Running processes terminate at their earliest convenience.
| status Indicate if the Postfix mail system is currently running.postfix/postfix-script: the Postfix mail system is running: PID: 77073
set-permissions [name=value ...]
Set the ownership and permissions of Postfix related files and directories, as specified in the postfix-files
file.
Specify name=value to override and update specific main.cf configuration parameters. Use this, for example, to
change the mail_owner or setgid_group setting for an already installed Postfix system.
This feature is available in Postfix 2.1 and later. With Postfix 2.0 and earlier, use "$config_directory/post-
install set-permissions".
| upgrade-configuration [name=value ...]
Update the main.cf and master.cf files with information that Postfix needs in order to run: add or update ser-
vices, and add or update configuration parameter settings.
Specify name=value to override and update specific main.cf configuration parameters.
This feature is available in Postfix 2.1 and later. With Postfix 2.0 and earlier, use "$config_directory/postinstall upgrade-configuration".
| The following options are implemented:
| -c config_dir
Read the main.cf and master.cf configuration files in the named directory instead of the default configuration
directory. Use this to distinguish between multiple Postfix instances on the same host.
With Postfix 2.6 and later, this option forces the postfix(1) command to operate on the specified Postfix
instance only. This behavior is inherited by postfix(1) commands that run as a descendant of the current
process.
| -D (with postfix start only)
Run each Postfix daemon under control of a debugger as specified via the debugger_command configuration parameter.
| -v Enable verbose logging for debugging purposes. Multiple -v options make the software increasingly verbose.
| | | | | | | | | | | | | |
ENVIRONMENT
The postfix(1) command exports the following environment variables before executing the postfix-script file:
MAIL_CONFIG
This is set when the -c command-line option is present.
With Postfix 2.6 and later, this environment variable forces the postfix(1) command to operate on the specified
Postfix instance only. This behavior is inherited by postfix(1) commands that run as a descendant of the cur-
rent process.
MAIL_VERBOSE
This is set when the -v command-line option is present.
MAIL_DEBUG
This is set when the -D command-line option is present.
CONFIGURATION PARAMETERS
The following main.cf configuration parameters are exported as environment variables with the same names:
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.
config_directory (see 'postconf -d' output)
The default location of the Postfix main.cf and master.cf configuration files.
queue_directory (see 'postconf -d' output)
The location of the Postfix top-level queue directory.
mail_owner (postfix)
The UNIX system account that owns the Postfix queue and most Postfix daemon processes.
setgid_group (postdrop)
The group ownership of set-gid Postfix commands and of group-writable Postfix directories.
sendmail_path (see 'postconf -d' output)
A Sendmail compatibility feature that specifies the location of the Postfix sendmail(1) command.
newaliases_path (see 'postconf -d' output)
Sendmail compatibility feature that specifies the location of the newaliases(1) command.
mailq_path (see 'postconf -d' output)
Sendmail compatibility feature that specifies where the Postfix mailq(1) command is installed.
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.
manpage_directory (see 'postconf -d' output)
Where the Postfix manual pages are installed.
readme_directory (see 'postconf -d' output)
The location of Postfix README files that describe how to build, configure or operate a specific Postfix subsys-
tem or feature.
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).
Other configuration parameters:
config_directory (see 'postconf -d' output)
The default location of the Postfix main.cf and master.cf configuration files.
import_environment (see 'postconf -d' output)
The list of environment parameters that a Postfix process will import from a non-Postfix parent process.
syslog_facility (mail)
The syslog facility of Postfix logging.
syslog_name (see 'postconf -d' output)
The mail system name that is prepended to the process name in syslog records, so that "smtpd" becomes, for exam-
ple, "postfix/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 Post-
fix 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.
FILES
Prior to Postfix version 2.6, all of the following files were in $config_directory. Some files are now in $dae-
mon_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 val-
ues.
$config_directory/main.cf, Postfix configuration parameters
$config_directory/master.cf, Postfix daemon processes
$daemon_directory/postfix-files, file/directory permissions
$daemon_directory/postfix-script, administrative commands
$daemon_directory/post-install, post-installation configuration
SEE ALSO
Commands:
postalias(1), create/update/query alias database
postcat(1), examine Postfix queue file
postconf(1), Postfix configuration utility
postfix(1), Postfix control program
postkick(1), trigger Postfix daemon
postlock(1), Postfix-compatible locking
postlog(1), Postfix-compatible logging
postmap(1), Postfix lookup table manager
postmulti(1), Postfix multi-instance manager
postqueue(1), Postfix mail queue control
postsuper(1), Postfix housekeeping
mailq(1), Sendmail compatibility interface
newaliases(1), Sendmail compatibility interface
sendmail(1), Sendmail compatibility interface
Postfix configuration:
bounce(5), Postfix bounce message templates
master(5), Postfix master.cf file syntax
postconf(5), Postfix main.cf file syntax
postfix-wrapper(5), Postfix multi-instance API
Table-driven mechanisms:
access(5), Postfix SMTP access control table
aliases(5), Postfix alias database
canonical(5), Postfix input address rewriting
generic(5), Postfix output address rewriting
header_checks(5), body_checks(5), Postfix content inspection
relocated(5), Users that have moved
transport(5), Postfix routing table
virtual(5), Postfix virtual aliasing
Table lookup mechanisms:
cidr_table(5), Associate CIDR pattern with value
ldap_table(5), Postfix LDAP client
memcache_table(5), Postfix memcache client
mysql_table(5), Postfix MYSQL client
nisplus_table(5), Postfix NIS+ client
pcre_table(5), Associate PCRE pattern with value
pgsql_table(5), Postfix PostgreSQL client
regexp_table(5), Associate POSIX regexp pattern with value
sqlite_table(5), Postfix SQLite database driver
tcp_table(5), Postfix client-server table lookup
Daemon processes:
anvil(8), Postfix connection/rate limiting
bounce(8), defer(8), trace(8), Delivery status reports
cleanup(8), canonicalize and enqueue message
discard(8), Postfix discard delivery agent
dnsblog(8), DNS black/whitelist logger
error(8), Postfix error delivery agent
flush(8), Postfix fast ETRN service
local(8), Postfix local delivery agent
master(8), Postfix master daemon
oqmgr(8), old Postfix queue manager
pickup(8), Postfix local mail pickup
pipe(8), deliver mail to non-Postfix command
postscreen(8), Postfix zombie blocker
proxymap(8), Postfix lookup table proxy server
qmgr(8), Postfix queue manager
qmqpd(8), Postfix QMQP server
scache(8), Postfix connection cache manager
showq(8), list Postfix mail queue
smtp(8), lmtp(8), Postfix SMTP+LMTP client
smtpd(8), Postfix SMTP server
spawn(8), run non-Postfix server
tlsmgr(8), Postfix TLS cache and randomness manager
tlsproxy(8), Postfix TLS proxy server
trivial-rewrite(8), Postfix address rewriting
verify(8), Postfix address verification
virtual(8), Postfix virtual delivery agent
Other:
syslogd(8), system logging
README FILES
Use "postconf readme_directory" or "postconf html_directory" to locate this information.
OVERVIEW, overview of Postfix commands and processes
BASIC_CONFIGURATION_README, Postfix basic configuration
ADDRESS_REWRITING_README, Postfix address rewriting
SMTPD_ACCESS_README, SMTP relay/access control
CONTENT_INSPECTION_README, Postfix content inspection
QSHAPE_README, Postfix queue analysis
/System/Library/LaunchDaemons/com.apple.postfix.master.plist
master - Postfix master process
master [-Ddtvw] [-c config_dir] [-e exit_time]
daemon is the resident process that runs Postfix daemons on demand: daemons to send or receive messages
via the network, daemons to deliver mail locally, etc. These daemons are created on demand up to a configurable maximum number per service.
Postfix daemons terminate voluntarily, either after being idle for a configurable amount of time,
or after having serviced a configurable number of requests.
Exceptions to this rule are the resident queue manager, address verification server, and the TLS session cache and pseudo-random number server.
The behavior of the master(8) daemon is controlled by the master.cf configuration file, as described in master(5).
-c config_dir
Read the main.cf and master.cf configuration files in the named directory instead of the default configuration
directory. This also overrides the configuration files for other Postfix daemon processes.
-D After initialization, run a debugger on the master process, specified with the debugger_command in the main.cf global configuration file.
-d Do not redirect stdin, stdout or stderr to /dev/null, and do not discard the controlling terminal. debugging only.
-e exit_time Terminate the master process after exit_time seconds. Child processes terminate at their convenience.
-t Test mode. Return a zero exit status when the master.pid lock file does not exist or when that file is not
locked. This is evidence that the master(8) daemon is not running.
-v Enable verbose logging for debugging purposes. passed to child processes. Multiple -v options increase verbose.
-w Wait in a dummy foreground process, while the real master daemon initializes in a background process. The dummy
foreground process returns a zero exit status only if the master daemon initialization is successful, and if it
completes in a reasonable amount of time.
Signals:
SIGHUP Upon receipt of a HUP signal (e.g., after "postfix reload"), the master process re-reads its configuration
files. If a service has been removed from the master.cf file, its running processes are terminated immediately.
Otherwise, running processes are allowed to terminate as soon as is convenient, so that changes in configuration
settings affect only new service requests.
SIGTERM Upon receipt of a TERM signal (e.g., after "postfix abort"), the master process passes the signal on to its
child processes and terminates. This is useful for an emergency shutdown. Normally one would terminate only the
master ("postfix stop") and allow running processes to finish what they are doing.
DIAGNOSTICS
Problems are reported to syslogd(8). The exit status is non-zero in case of problems, including problems while initial-
izing as a master daemon process in the background.
ENVIRONMENT
MAIL_DEBUG
After initialization, start a debugger as specified with the debugger_command configuration parameter in the
main.cf configuration file.
MAIL_CONFIG
Directory with Postfix configuration files.
CONFIGURATION PARAMETERS
Unlike most Postfix daemon processes, the master(8) server does not automatically pick up changes to main.cf.
Use "postfix reload" after a configuration change.
RESOURCE AND RATE CONTROLS
default_process_limit (100) The default maximal number of Postfix child processes that provide a given service.
max_idle (100s) maximum amount of time that an idle process waits for an incoming connection before terminating
max_use (100) maximal number of incoming connections before terminating
service_throttle_time (60s) How long the Postfix master(8) waits before forking a server that appears to be malfunctioning.
master_service_disable (empty)
Selectively disable master(8) listener ports by service type or by service name and type.
MISCELLANEOUS CONTROLS
config_directory (see 'postconf -d' output) default location of main.cf and master.cf configuration files.
daemon_directory (see 'postconf -d' output) directory with support programs and daemon programs.
debugger_command (empty) external command to execute when a daemon program is invoked with the -D option.
inet_interfaces (all) network interface addresses that this mail system receives mail on.
inet_protocols (all) Internet protocols Postfix will attempt to use when making or accepting connections.
import_environment (see 'postconf -d' output) list of environment parameters imported from a non-Postfix parent process.
mail_owner (postfix) UNIX system account that owns the queue and most daemons
process_id (read-only) process ID of a Postfix command or daemon process.
process_name (read-only) process name of a command or daemon process.
queue_directory (see 'postconf -d' output) location of the Postfix top-level queue directory.
syslog_facility (mail) The syslog facility of Postfix logging.
syslog_name (see 'postconf -d' output) prefix that is prepended to the process name in syslog so "smtpd" becomes "prefix/smtpd".
FILES
To expand the directory names below into their actual values, use the command "postconf config_directory" etc.
$config_directory/main.cf, global configuration file.
$config_directory/master.cf, master server configuration file.
$queue_directory/pid/master.pid, master lock file.
$data_directory/master.lock, master lock file.
SEE ALSO
qmgr(8), queue manager
verify(8), address verification
master(5), master.cf configuration file syntax
postconf(5), main.cf configuration file syntax
syslogd(8), system logging