Control the SMTP client program Cristiano Otto Von Trompczynski 11.. MMiisscceellllaanneeoouuss ccoonnttrroollss BBeesstt mmxx ttrraannssppoorrtt The "Best mx transport" option controls what happens when the local system is listed as the best MX host for a destination. By default, Postfix reports a "mail loops back to myself" error and bounces the message. Specify "local" to pass the mail to the local delivery agent. You can specify any transport that is defined in the master.cf file. This option sets the "best_mx_transport" postfix variable. FFaallllbbaacckk rreellaayy The "Fallback relay" option specifies zero or more hosts or domains to hand off mail to if a message destination is not found, or if a destination is unreachable. By default, mail is bounced when a destination is not found, and delivery is deferred if a destination is unreachable. This option sets the "fallback_relay" postfix variable. IIggnnoorree mmxx llooookkuupp eerrrroorr The "Ignore mx lookup error" option controls what happens when a name server fails to respond to an MX lookup request. By default, Postfix defers delivery and tries again after some delay. Specify "yes" to force an A record lookup instead. This option sets the "ignore_mx_lookup_error" postfix variable. SSmmttpp sskkiipp 44xxxx ggrreeeettiinngg The "Smtp skip 4xx greeting" option controls what happens when an SMTP server greets us with a 4XX status code. By default, Postfix backs off. Specify "yes" to move on the next mail exchanger. This option sets the "smtp_skip_4xx_greeting" postfix variable. SSmmttpp sskkiipp qquuiitt rreessppoonnssee The "Smtp skip quit response" option controls whether the SMTP client waits for the response to the QUIT command. The default is to not wait. This option sets the "smtp_skip_quit_response" postfix variable. 22.. RRaattee ccoonnttrroollss SSmmttpp ddeessttiinnaattiioonn ccoonnccuurrrreennccyy lliimmiitt The "Smtp destination concurrency limit" option limits the number of parallel deliveries to the same destination via the smtp delivery agent. The default limit is the "Default destination concurrency limit" option. It is probably safer to limit the concurrency to 10. This option sets the "smtp_destination_concurrency_limit" postfix variable. SSmmttpp ddeessttiinnaattiioonn rreecciippiieenntt lliimmiitt The "Smtp destination recipient limit" option limits the number of recipients per delivery via the smtp delivery agent. The default is taken from the "Default destination recipient limit" option. This option sets the "Smtp destination recipient limit" postfix variable. This option sets the "smtp_destination_recipient_limit" postfix variable. DDeeffaauulltt ddeessttiinnaattiioonn rreecciippiieenntt lliimmiitt The "Default destination recipient limit" option specifies a default limit on the number of recipients per message delivery. This is the default limit for delivery via SMTP, via the local delivery agent and via the pipe mailer. This option sets the "default_destination_recipient_limit" postfix variable. 33.. PPaarraalllleell ddeelliivveerryy ttoo tthhee ssaammee ddeessttiinnaattiioonn LLooccaall ddeessttiinnaattiioonn ccoonnccuurrrreennccyy lliimmiitt How many parallel deliveries to the same user or domain? With local delivery, it does not make sense to do massively parallel delivery to the same user, because mailbox updates must happen sequentially, and expensive pipelines in .forward files can cause disasters when too many are run at the same time. With SMTP deliveries, 10 simultaneous connections to the same domain could be sufficient to raise eyebrows. Each message delivery transport has its XXX_destination_concurrency_limit parameter. The default is is taken from the "Default destination concurrency limit" option. This option sets the "local_destination_concurrency_limit" postfix variable. DDeeffaauulltt ddeessttiinnaattiioonn ccoonnccuurrrreennccyy lliimmiitt The "Default destination concurrency limit" option specifies a default limit on the number of parallel deliveries to the same destination. This is the default limit for delivery via SMTP, via the local delivery agent and via the pipe mailer. This option sets the "default_destination_concurrency_limit" postfix variable. 44.. TTiimmeeoouutt ccoonnttrroollss SSmmttpp ccoonnnneecctt ttiimmeeoouutt The "Smtp connect timeout" option specifies the SMTP client timeout in seconds for completing a TCP connection. When no connection can be made within the deadline, the SMTP client tries the next address on the mail exchanger list. Specify 0 to disable the timeout. This option sets the "smtp_connect_timeout" postfix variable. SSmmttpp hheelloo ttiimmeeoouutt The "Smtp helo timeout" option specifies the SMTP client timeout in seconds for receiving the SMTP greeting banner. When the server drops the connection without sending a greeting banner, or when it sends no greeting banner within the deadline, the SMTP client tries the next address on the mail exchanger list. This option sets the "smtp_helo_timeout" postfix variable. SSmmttpp mmaaiill ttiimmeeoouutt The "Smtp mail timeout" option specifies the SMTP client timeout in seconds for sending the SMTP MAIL FROM command, and for receiving the server response. In case of problems the client does NOT try the next address on the mail exchanger list. This option sets the "smtp_mail_timeout" postfix variable. SSmmttpp rrccpptt ttiimmeeoouutt The "Smtp rcpt timeout" option specifies the SMTP client timeout in seconds for sending the SMTP RCPT TO command, and for receiving the server response. In case of problems the client does NOT try the next address on the mail exchanger list. This option sets the "smtp_rcpt_timeout" postfix variable. SSmmttpp ddaattaa iinniitt ttiimmeeoouutt The "Smtp data init timeout" option specifies the SMTP client timeout in seconds for sending the SMTP DATA command, and for receiving the server response. In case of problems the client does NOT try the next address on the mail exchanger list. This option sets the "smtp_data_init_timeout" postfix variable. SSmmttpp ddaattaa xxffeerr ttiimmeeoouutt The "Smtp data xfer timeout" option specifies the SMTP client timeout in seconds for sending the SMTP message content. When the connection stalls for more than "Smtp_data_xfer_timeout" option them SMTP client terminates the transfer. In case of problems the client does NOT try the next address on the mail exchanger list. This option sets the "smtp_data_xfer_timeout" postfix variable. SSmmttpp ddaattaa ddoonnee ttiimmeeoouutt The "Smtp data done timeout" option specifies the SMTP client timeout in seconds for sending the SMTP ".", and for receiving the server response. When no response is received within the deadline, a warning is logged that the mail may be delivered multiple times. In case of problems the client does NOT try the next address on the mail exchanger list. This option sets the "smtp_data_done_timeout" postfix variable. SSmmttpp qquuiitt ttiimmeeoouutt The "Smtp quit timeout" option specifies the SMTP client timeout in seconds for sending the SMTP QUIT command, and for receiving the server response. This option sets the "smtp_quit_timeout" postfix variable. 55.. DDeelliivveerryy ttoo mmaaiillbbooxx HHoommee mmaaiillbbooxx The "Home mailbox" option specifies the optional pathname of a mailbox file relative to a user's home directory. The default mailbox file is /var/spool/mail/user or /var/mail/user. Specify "Maildir/" for qmail-style delivery (the / is required). This option sets the "home_mailbox" postfix variable. MMaaiill ssppooooll ddiirreeccttoorryy The "Mail spool directory" option specifies the directory where UNIX-style mailboxes are kept. The default setting depends on the system type. This option sets the "mail_spool_directory" postfix variable. MMaaiillbbooxx ccoommmmaanndd The "Mailbox command" option specifies the optional external command to use instead of mailbox delivery. The command is run as the recipient with proper HOME, SHELL and LOGNAME environment settings. Exception: delivery for root is done as "$default_user". Other environment variables of interest: USER (recipient username), EXTENSION (address extension), DOMAIN (domain part of address), and LOCAL (the address localpart). Unlike other Postfix configuration parameters, the "Mailbox command" option is not subjected to "$parameter" substitutions. This is to make it easier to specify shell syntax (see example below). Avoid shell meta characters because they will force Postfix to run an expensive shell process. Procmail alone is expensive enough. This option sets the "mailbox_command" postfix variable. IF YOU USE THIS TO DELIVER MAIL SYSTEM-WIDE, YOU MUST SET UP AN ALIAS THAT FORWARDS MAIL FOR ROOT TO A REAL USER. mailbox_command = /some/where/procmail mailbox_command = /some/where/procmail -a "$EXTENSION" MMaaiillbbooxx ttrraannssppoorrtt The "Mailbox transport" option specifies the optional transport in master.cf to use after processing aliases and .forward files. This option has precedence over the 'Mailbox command', the "mailbox_transport" postfix variable. FFaallllbbaacckk ttrraannssppoorrtt The "Fallback transport" specifies the optional transport in master.cf to use for recipients that are not found in the UNIX passwd database. This parameter has precedence over the "Luser relay" option. This option sets the "fallback_transport" postfix variable. LLuusseerr rreellaayy The "Luser relay" option specifies an optional destination address for unknown recipients. By default, mail for unknown local recipients is bounced. This option sets the "luser_relay" postfix variable. The following expansions are done on luser_relay: $user (recipient username), $shell (recipient shell), $home (recipient home directory), $recipient (full recipient address), $extension (recipient address extension), $domain (recipient domain), $local (entire recipient localpart), $recipient_delimiter. Specify ${name?value} or ${name:value} to expand value only when $name does (does not) exist.