Basic Postfix Configurations Cristiano Otto Von Trompczynski 11.. LLooccaall ppaatthh iinnffoorrmmaattiioonn QQuueeuuee ddiirreeccttoorryy The "Queue directory" option specifies the location of the Postfix queue. This is also the root directory of Postfix daemons that run chrooted. See the files in examples/chroot- setup/ for setting up Postfix chroot environments on different UNIX systems. This option sets the "queue_directory" postfix variable. CCoommmmaanndd ddiirreeccttoorryy The "Command directory" option specifies the location of all postXXX commands. The default value is taken from the "Program directory" option in Miscellaneous. This option sets the "command_directory" postfix variable. DDaaeemmoonn ddiirreeccttoorryy The "Daemon directory" option specifies the location of all Postfix daemon programs (i.e. programs listed in the master.cf file). The default value is taken from the "Program directory" option in Miscellaneous. This directory must be owned by root. This option sets the "daemon_directory" postfix variable. 22.. QQuueeuuee aanndd pprroocceessss oowwnneerrsshhiipp MMaaiill oowwnneerr The "Mail owner" option specifies the owner of the Postfix queue and of most "Postfix daemon processes". Specify the name of a user account THAT DOES NOT SHARE A GROUP WITH OTHER ACCOUNTS AND THAT OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In particular, don't specify nobody or daemon. PLEASE USE A DEDICATED USER. This option sets the "mail_owner" postfix variable. DDeeffaauulltt pprriivviilleeggeess The "Default privileges" option specifies the default rights used by the local delivery agent for delivery to external file or command. These rights are used in the absence of a recipient user context. DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER. This option sets the "default_privs" postfix variable. 33.. IInntteerrnneett hhoosstt aanndd ddoommaaiinn nnaammeess HHoossttnnaammee The "Hostname" option specifies the "internet hostname" of this mail system. The default is to use the fully-qualified domain name from gethostname(). The "Hostname" option is used as a default value for many other configuration parameters. This option sets the "myhostname" postfix variable. DDoommaaiinn The "Domain" option specifies the local internet domain name. The default is to use the contents of "Hostname" minus the first component. The "Domain" option is used as a default value for many other configuration parameters. This option sets the "mydomain" postfix variable. 44.. SSeennddiinngg mmaaiill OOrriiggiinn The "Origin" option specifies the domain that locally-posted mail appears to come from. The default is to append "hostname", which is fine for small sites. If you run a domain with multiple machines, you should (1) change this to "domain" and (2) set up a domain-wide alias database that aliases each user to user@that.users.mailhost. This option sets the "myorigin" postfix variable. 55.. RReecceeiivviinngg mmaaiill NNeettwwoorrkk iinntteerrffaaccee The "Network interfaces" option specifies the network interface addresses that this mail system receives mail on. By default, the software claims _a_l_l active interfaces on the machine. The parameter also controls delivery of mail to user@[ip.address]. This option sets the "inet_interfaces" postfix variable. DDeessttiinnaattiioonn The "Destination" option specifies the list of domains that this machine considers itself the final destination for. That does not include domains that are hosted on this machine. Those domains are specified elsewhere (see sample-virtual.cf, and sample-transport.cf). The default is "myhostname + localhost.$mydomain". On a mail domain gateway, you should also include "$mydomain". Do not specify the names of domains that this machine is backup MX host for. Specify those names via the "Relay domains" option in The local machine is always the final destination for mail addressed to user@[the.net.work.address] of an interface that the mail system receives mail on (see the Inet interfaces help). Specify a list of host or domain names, /file/name or type:table patterns, separated by commas and/or whitespace. A /file/name pattern is replaced by its contents; a type:table is matched when a name matches a lookup key. This option sets the "inet_interfaces" postfix variable. DO NOT LIST VIRTUAL DOMAINS HERE. LIST THEM IN THE TABLE->VIRTUAL ITEM INSTEAD. BE SURE TO READ THE ENTIRE VIRTUAL MANUAL PAGE. 66.. RReejjeeccttiinngg uunnkknnoowwnn llooccaall uusseerrss LLooccaall rreecciippiieenntt mmaappss The "Local recipient maps" option specifies optional lookup tables with all users that are local with respect to "$mydestination" and "$inet_interfaces". If this parameter is defined, then the SMTP server will reject mail for unknown local users. The "Local recipient maps" option accepts tables with bare usernames such as unix:passwd.byname and alias maps. Beware: if the Postfix SMTP server runs chrooted, you may have to copy the passwd database into the jail. This is system dependent. This option sets the "local_recipient_maps" postfix variable. FOR THIS TO WORK, DO NOT SPECIFY VIRTUAL DOMAINS IN MYDESTINATION. MYDESTINATION MUST LIST NON-VIRTUAL DOMAINS ONLY. 77.. DDeebbuuggggiinngg ccoonnttrrooll DDeebbuugg ppeeeerr lleevveell The "Debug peer level" option specifies the increment in verbose logging level when an SMTP client or server host name or address matches a pattern in the "Debug peer list" option. This option sets the "debug_peer_level" postfix variable. DDeebbuugg ppeeeerr lliisstt The "Debug peer list" option specifies an optional list of domain or network patterns, /file/name patterns or type:name tables. When an SMTP client or server host name or address matches a pattern, increase the verbose logging level by the amount specified in the "Debug peer level" option. This option sets the "debug_peer_list" postfix variable. DDeebbuuggggeerr ccoommmmaanndd The "Debugger command" option specifies the external command that is executed when a Postfix daemon program is run with the -D option. Use "command .. & sleep 5" so that the debugger can attach before the process marches on. If you use an X-based debugger, be sure to set up your XAUTHORITY environment variable before starting Postfix. This option sets the "debugger_command" postfix variable.