MASTER(8)

๐Ÿ“ฆ
version 3.11.7 ยท 4 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

๐Ÿ’– master(8) โ€” the Postfix master process, aka the girlboss of your mail server ๐Ÿ’–

okay bestie, sit down, grab a boba, because we're talking about master โ€” this is the master(8) page from the System Manager's Manual and she is the main character. ๐Ÿ‘‘


โœจ NAME โœจ

master โ€” the Postfix master process. she's the one running the whole show, no cap.


๐ŸŒธ SYNOPSIS ๐ŸŒธ

master [-Dditvw] [-c config_dir] [-e exit_time]

that's it. that's the summoning ritual. ๐Ÿ•ฏ๏ธ


๐Ÿ’… DESCRIPTION ๐Ÿ’…

the master(8) daemon is the resident process that runs Postfix daemons on demand โ€” like, daemons to send or receive messages via the network, daemons to deliver mail locally, etc. she's not doing the work herself, she's delegating, which is very queen behaviour honestly. ๐ŸŽ€

these daemons get 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. iconic, self-aware, knows when to leave the party. ๐Ÿฆ‹

but bestie, there are EXCEPTIONS to this rule: the resident queue manager, the address verification server, and the TLS session cache and pseudo-random number server. those ones do NOT just dip when they feel like it.

the behavior of the master(8) daemon is controlled by the master.cf configuration file, as described in master(5). so if she's acting up, check master.cf first, iykyk. ๐Ÿ’œ

โญ Options โญ

  • -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. she's changing the whole friend group's plans with this one.
  • -D โ€” after initialization, run a debugger on the master process. the debugging command is 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. โš ๏ธ this must be used for debugging only. don't be out here using this casually bestie.
  • -e exit_time โ€” terminate the master process after exit_time seconds. child processes terminate at their convenience. like setting a bedtime for the whole household. ๐Ÿ˜ญ
  • -i โ€” enable init mode: do not become a session or process group leader; and similar to -s, do not redirect stdout to /dev/null, so that "maillog_file = /dev/stdout" works. this mode is allowed only if the process ID equals 1.

this feature is available in Postfix 3.3 and later. โœจ

  • -s โ€” do not redirect stdout to /dev/null, so that "maillog_file = /dev/stdout" works.

this feature is available in Postfix 3.4 and later. โœจ

  • -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. she's ghosting, fr fr.
  • -v โ€” enable verbose logging for debugging purposes. this option is passed on to child processes. multiple -v options make the software increasingly verbose. the way that one -v is never enough... ๐Ÿ’€
  • -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.

this feature is available in Postfix 2.10 and later. โœจ


๐Ÿšจ 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. she read the group chat and updated the plan, but everyone already out is finishing their errands first. ๐Ÿซถ
  • 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. this is the nuclear option, bestie โ€” don't reach for it unless it's an actual emergency. ๐Ÿ’€

๐ŸŒˆ DIAGNOSTICS ๐ŸŒˆ

problems are reported to syslogd(8) or postlogd(8). the exit status is non-zero in case of problems, including problems while initializing 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. and changes to master.cf are NEVER picked up automatically. use the "postfix reload" command after a configuration change. she does not read the chat unless you @ her, periodt. ๐Ÿ“ฃ


๐Ÿ”ฅ RESOURCE AND RATE CONTROLS ๐Ÿ”ฅ

  • default_process_limit (100) โ€” the default maximal number of Postfix child processes that provide a given service.
  • max_idle (100s) โ€” the maximum amount of time that an idle Postfix daemon process waits for an incoming connection before terminating voluntarily.
  • max_use (100) โ€” the maximal number of incoming connections that a Postfix daemon process will service before terminating voluntarily.
  • service_throttle_time (60s) โ€” how long the Postfix master(8) waits before forking a server that appears to be malfunctioning.

available in Postfix version 2.6 and later:

  • 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) โ€” the default location of the Postfix main.cf and master.cf configuration files.
  • daemon_directory (see postconf -d output) โ€” the directory with Postfix support programs and daemon programs.
  • debugger_command (empty) โ€” the external command to execute when a Postfix daemon program is invoked with the -D option.
  • inet_interfaces (all) โ€” the local network interface addresses that this mail system receives mail on.
  • inet_protocols (see postconf -d output) โ€” the Internet protocols Postfix will attempt to use when making or accepting connections.
  • import_environment (see postconf -d output) โ€” the list of environment variables that a privileged Postfix process will import from a non-Postfix parent process, or name=value environment overrides.
  • mail_owner (postfix) โ€” the UNIX system account that owns the Postfix queue and most Postfix daemon processes.
  • process_id (read-only) โ€” the process ID of a Postfix command or daemon process.
  • process_name (read-only) โ€” the process name of a Postfix command or daemon process.
  • queue_directory (see postconf -d output) โ€” the location of the Postfix top-level queue directory.
  • 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 3.3 and later:

  • service_name (read-only) โ€” the master.cf service name of a Postfix daemon process.

available in Postfix 3.6 and later:

  • known_tcp_ports (lmtp=24, smtp=25, smtps=submissions=465, submission=587) โ€” optional setting that avoids lookups in the services(5) database.

๐ŸŽ€ 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 ๐Ÿฆ‹


โญ LICENSE โญ

the Secure Mailer license must be distributed with this software. ๐Ÿ“œ


๐ŸŒธ AUTHOR(S) ๐ŸŒธ

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


and that's the whole page bestie!! ๐Ÿ’– this one lives in the System Manager's Manual as master(8), so if you ever forget where you read it, that's the vibe check you're looking for. slay, go forth, and don't SIGTERM unless it's an emergency. ๐Ÿซถโœจ

๐Ÿ“ฆ where this page comes from