smtp

title: smtp(8)

text:
# smtp(8)

## NAME
smtp - Postfix SMTP+LMTP client

## SYNOPSIS

```
smtp [generic Postfix daemon options] [flags=DORX]
```

## DESCRIPTION

The Postfix SMTP+LMTP client implements the SMTP and LMTP mail delivery protocols. It processes message delivery requests from the queue manager. Each request specifies a queue file, a sender address, a domain or host to deliver to, and recipient information. This program expects to be run from the master(8) process manager.

The SMTP+LMTP client updates the queue file and marks recipients as finished, or it informs the queue manager that delivery should be tried again at a later time. Delivery status reports are sent to the bounce(8), defer(8) or trace(8) daemon as appropriate.

The SMTP+LMTP client looks up a list of mail exchanger addresses for the destination host, sorts the list by preference, and connects to each listed address until it finds a server that responds.

When a server is not reachable, or when mail delivery fails due to a recoverable error condition, the SMTP+LMTP client will try to deliver the mail to an alternate host.

After a successful mail transaction, a connection may be saved to the scache(8) connection cache server, so that it may be used by any SMTP+LMTP client for a subsequent transaction.

By default, connection caching is enabled temporarily for destinations that have a high volume of mail in the active queue. Connection caching can be enabled permanently for specific destinations.

## SMTP DESTINATION SYNTAX

```

```

The Postfix SMTP+LMTP client supports multiple destinations separated by comma or whitespace (Postfix 3.5 and later). SMTP destinations have the following form:

domainname

domainname:port

Look up the mail exchangers for the specified domain, and connect to the specified port (default: smtp).

[hostname]

[hostname]:port

Look up the address(es) of the specified host, and connect to the specified port (default: smtp).

[address]

[address]:port

Connect to the host at the specified address, and connect to the specified port (default: smtp). An IPv6 address must be formatted as [ipv6:address].

## LMTP DESTINATION SYNTAX

```

```

The Postfix SMTP+LMTP client supports multiple destinations separated by comma or whitespace (Postfix 3.5 and later). LMTP destinations have the following form:

unix:pathname

Connect to the local UNIX-domain server that is bound to the specified pathname. If the process runs chrooted, an absolute pathname is interpreted relative to the Postfix queue directory.

inet:hostname

inet:hostname:port

inet:[address]

inet:[address]:port

Connect to the specified TCP port on the specified local or remote host. If no port is specified, connect to the port defined as lmtp in services(4). If no such service is found, the lmtp_tcp_port configuration parameter (default value of 24) will be used. An IPv6 address must be formatted as [ipv6:address].

## SINGLE-RECIPIENT DELIVERY

```

```

By default, the Postfix SMTP+LMTP client delivers mail to multiple recipients per delivery request. This is undesirable when prepending a Delivered-to: or X-Original-To: message header. To prevent Postfix from sending multiple recipients per delivery request, specify

```
    transport_destination_recipient_limit = 1
```

in the Postfix main.cf file, where transport is the name in the first column of the Postfix master.cf entry for this mail delivery service.

## COMMAND ATTRIBUTE SYNTAX

```

```

flags=DORX (optional)

Optional message processing flags.

D

Prepend a "Delivered-To: recipient" message header with the envelope recipient address. Note: for this to work, the transport_destination_recipient_limit must be 1 (see SINGLE-RECIPIENT DELIVERY above for details). The D flag also enforces loop detection: if a message already contains a Delivered-To: header with the same recipient address, then the message is returned as undeliverable. The address comparison is case insensitive.

This feature is available as of Postfix 3.5.

O

Prepend an "X-Original-To: recipient" message header with the recipient address as given to Postfix. Note: for this to work, the transport_destination_recipient_limit must be 1 (see SINGLE-RECIPIENT DELIVERY above for details). This feature is available as of Postfix 3.5.

R

Prepend a "Return-Path: <sender>" message header with the envelope sender address. This feature is available as of Postfix 3.5.

X

Indicates that the delivery is final. This flag affects the status reported in "success" DSN (delivery status notification) messages, and changes it from "relayed" into "delivered". This feature is available as of Postfix 3.5.

## SECURITY

```
The SMTP+LMTP client is moderately security-sensitive. It
talks to SMTP or LMTP servers and to DNS servers on the
network. The SMTP+LMTP client can be run chrooted at fixed
low privilege.
```

## STANDARDS

```
RFC 821 (SMTP protocol)
RFC 822 (ARPA Internet Text Messages)
RFC 1651 (SMTP service extensions)
RFC 1652 (8bit-MIME transport)
RFC 1870 (Message Size Declaration)
RFC 2033 (LMTP protocol)
RFC 2034 (SMTP Enhanced Error Codes)
RFC 2045 (MIME: Format of Internet Message Bodies)
RFC 2046 (MIME: Media Types)
RFC 2554 (AUTH command)
RFC 2821 (SMTP protocol)
RFC 2782 (SRV resource records)
RFC 2920 (SMTP Pipelining)
RFC 3207 (STARTTLS command)
RFC 3461 (SMTP DSN Extension)
RFC 3463 (Enhanced Status Codes)
RFC 4954 (AUTH command)
RFC 5321 (SMTP protocol)
RFC 6531 (Internationalized SMTP)
RFC 6533 (Internationalized Delivery Status Notifications)
RFC 7672 (SMTP security via opportunistic DANE TLS)
```

## DIAGNOSTICS

Problems and transactions are logged to syslogd(8) or postlogd(8). Corrupted message files are marked so that the queue manager can move them to the corrupt queue for further inspection.

Depending on the setting of the notify_classes parameter, the postmaster is notified of bounces, protocol problems, and of other trouble.

## BUGS

SMTP and LMTP connection reuse for TLS (without closing the SMTP or LMTP connection) is not supported before Postfix 3.4.

SMTP and LMTP connection reuse assumes that SASL credentials are valid for all destinations that map onto the same IP address and TCP port.

## CONFIGURATION PARAMETERS

```

```

Before Postfix version 2.3, the LMTP client is a separate program that implements only a subset of the functionality available with SMTP: there is no support for TLS, and connections are cached in-process, making it ineffective when the client is used for multiple domains.

Most smtp_xxx configuration parameters have an lmtp_xxx "mirror" parameter for the equivalent LMTP feature. This document describes only those LMTP-related parameters that aren't simply "mirror" parameters.

Changes to main.cf are picked up automatically, as smtp(8) processes run for only a limited amount of time. Use the command "postfix reload" to speed up a change.

The text below provides only a parameter summary. See postconf(5) for more details including examples.

## COMPATIBILITY CONTROLS

```

```

ignore_mx_lookup_error (no)

Ignore DNS MX lookups that produce no response.

smtp_always_send_ehlo (yes)

Always send EHLO at the start of an SMTP session.

smtp_never_send_ehlo (no)

Never send EHLO at the start of an SMTP session.

smtp_defer_if_no_mx_address_found (no)

Defer mail delivery when no MX record resolves to an IP address.

smtp_line_length_limit (998)

The maximal length of message header and body lines that Postfix will send via SMTP.

smtp_pix_workaround_delay_time (10s)

How long the Postfix SMTP client pauses before sending ".<CR><LF>" in order to work around the PIX firewall "<CR><LF>.<CR><LF>" bug.

smtp_pix_workaround_threshold_time (500s)

How long a message must be queued before the Postfix SMTP client turns on the PIX firewall "<CR><LF>.<CR><LF>" bug workaround for delivery through firewalls with "smtp fixup" mode turned on.

smtp_pix_workarounds (disable_esmtp, delay_dotcrlf)

A list that specifies zero or more workarounds for CISCO PIX firewall bugs.

smtp_pix_workaround_maps (empty)

Lookup tables, indexed by the remote SMTP server address, with per-destination workarounds for CISCO PIX firewall bugs.

smtp_quote_rfc821_envelope (yes)

Quote addresses in Postfix SMTP client MAIL FROM and RCPT TO commands as required by RFC 5321.

smtp_reply_filter (empty)

A mechanism to transform replies from remote SMTP servers one line at a time.

smtp_skip_5xx_greeting (yes)

Skip remote SMTP servers that greet with a 5XX status code.

smtp_skip_quit_response (yes)

Do not wait for the response to the SMTP QUIT command.

Available in Postfix version 2.0 and earlier:

smtp_skip_4xx_greeting (yes)

Skip SMTP servers that greet with a 4XX status code (go away, try again later).

Available in Postfix version 2.2 and later:

smtp_discard_ehlo_keyword_address_maps (empty)

Lookup tables, indexed by the remote SMTP server address, with case insensitive lists of EHLO keywords (pipelining, starttls, auth, etc.) that the Postfix SMTP client will ignore in the EHLO response from a remote SMTP server.

smtp_discard_ehlo_keywords (empty)

A case insensitive list of EHLO keywords (pipelining, starttls, auth, etc.) that the Postfix SMTP client will ignore in the EHLO response from a remote SMTP server.

smtp_generic_maps (empty)

Optional lookup tables that perform address rewriting in the Postfix SMTP client, typically to transform a locally valid address into a globally valid address when sending mail across the Internet.

Available in Postfix version 2.2.9 and later:

smtp_cname_overrides_servername (version dependent)

When the remote SMTP servername is a DNS CNAME, replace the servername with the result from CNAME expansion for the purpose of logging, SASL password lookup, TLS policy decisions, or TLS certificate verification.

Available in Postfix version 2.3 and later:

lmtp_discard_lhlo_keyword_address_maps (empty)

Lookup tables, indexed by the remote LMTP server address, with case insensitive lists of LHLO keywords (pipelining, starttls, auth, etc.) that the Postfix LMTP client will ignore in the LHLO response from a remote LMTP server.

lmtp_discard_lhlo_keywords (empty)

A case insensitive list of LHLO keywords (pipelining, starttls, auth, etc.) that the Postfix LMTP client will ignore in the LHLO response from a remote LMTP server.

Available in Postfix version 2.4.4 and later:

send_cyrus_sasl_authzid (no)

When authenticating to a remote SMTP or LMTP server with the default setting "no", send no SASL authoriZation ID (authzid); send only the SASL authentiCation ID (authcid) plus the authcid's password.

Available in Postfix version 2.5 and later:

smtp_header_checks (empty)

Restricted header_checks(5) tables for the Postfix SMTP client.

smtp_mime_header_checks (empty)

Restricted mime_header_checks(5) tables for the Postfix SMTP client.

smtp_nested_header_checks (empty)

Restricted nested_header_checks(5) tables for the Postfix SMTP client.

smtp_body_checks (empty)

Restricted body_checks(5) tables for the Postfix SMTP client.

Available in Postfix version 2.6 and later:

tcp_windowsize (0)

An optional workaround for routers that break TCP window scaling.

Available in Postfix version 2.8 and later:

smtp_dns_resolver_options (empty)

DNS Resolver options for the Postfix SMTP client.

Available in Postfix version 2.9 - 3.6:

smtp_per_record_deadline (no)

Change the behavior of the smtp_*_timeout time limits, from a time limit per read or write system call, to a time limit to send or receive a complete record (an SMTP command line, SMTP response line, SMTP message content line, or TLS protocol message).

Available in Postfix version 2.9 and later:

smtp_send_dummy_mail_auth (no)

Whether or not to append the "AUTH=<>" option to the MAIL FROM command in SASL-authenticated SMTP sessions.

Available in Postfix version 2.11 and later:

smtp_dns_support_level (empty)

Level of DNS support in the Postfix SMTP client.

Available in Postfix version 3.0 and later:

smtp_delivery_status_filter ($default_delivery_status_filter)

Optional filter for the smtp(8) delivery agent to change the delivery status code or explanatory text of successful or unsuccessful deliveries.

smtp_dns_reply_filter (empty)

Optional filter for Postfix SMTP client DNS lookup results.

Available in Postfix version 3.3 and later:

smtp_balance_inet_protocols (yes)

When a remote destination resolves to a combination of IPv4 and IPv6 addresses, ensure that the Postfix SMTP client can try both address types before it runs into the smtp_mx_address_limit.

Available in Postfix 3.5 and later:

info_log_address_format (external)

The email address form that will be used in non-debug logging (info, warning, etc.).

Available in Postfix 3.6 and later:

dnssec_probe (ns:.)

The DNS query type (default: "ns") and DNS query name (default: ".") that Postfix may use to determine whether DNSSEC validation is available.

known_tcp_ports (lmtp=24, smtp=25, smtps=submissions=465, submission=587)

Optional setting that avoids lookups in the services(5) database.

Available in Postfix version 3.7 and later:

smtp_per_request_deadline (no)

Change the behavior of the smtp_*_timeout time limits, from a time limit per plaintext or TLS read or write call, to a combined time limit for sending a complete SMTP request and for receiving a complete SMTP response.

smtp_min_data_rate (500)

The minimum plaintext data transfer rate in bytes/second for DATA requests, when deadlines are enabled with smtp_per_request_deadline.

header_from_format (standard)

The format of the Postfix-generated From: header.

Available in Postfix version 3.8 and later:

use_srv_lookup (empty)

Enables discovery for the specified service(s) using DNS SRV records.

ignore_srv_lookup_error (no)

When SRV record lookup fails, fall back to MX or IP address lookup as if SRV record lookup was not enabled.

allow_srv_lookup_fallback (no)

When SRV record lookup fails or no SRV record exists, fall back to MX or IP address lookup as if SRV record lookup was not enabled.

## MIME PROCESSING CONTROLS

```

```

Available in Postfix version 2.0 and later:

disable_mime_output_conversion (no)

Disable the conversion of 8BITMIME format to 7BIT format.

mime_boundary_length_limit (2048)

The maximal length of MIME multipart boundary strings.

mime_nesting_limit (100)

The maximal recursion level that the MIME processor will handle.

## EXTERNAL CONTENT INSPECTION CONTROLS

```

```

Available in Postfix version 2.1 and later:

smtp_send_xforward_command (no)

Send the non-standard XFORWARD command when the Postfix SMTP server EHLO response announces XFORWARD support.

## SASL AUTHENTICATION CONTROLS

```

```

smtp_sasl_auth_enable (no)

Enable SASL authentication in the Postfix SMTP client.

smtp_sasl_password_maps (empty)

Optional Postfix SMTP client lookup tables with one username:password entry per sender, remote hostname or next-hop domain.

smtp_sasl_security_options (noplaintext, noanonymous)

Postfix SMTP client SASL security options; as of Postfix 2.3 the list of available features depends on the SASL client implementation that is selected with smtp_sasl_type.

Available in Postfix version 2.2 and later:

smtp_sasl_mechanism_filter (empty)

If non-empty, a Postfix SMTP client filter for the remote SMTP server's list of offered SASL mechanisms.

Available in Postfix version 2.3 and later:

smtp_sender_dependent_authentication (no)

Enable sender-dependent authentication in the Postfix SMTP client; this is available only with SASL authentication, and disables SMTP connection caching to ensure that mail from different senders will use the appropriate credentials.

smtp_sasl_path (empty)

Implementation-specific information that the Postfix SMTP client passes through to the SASL plug-in implementation that is selected with smtp_sasl_type.

smtp_sasl_type (cyrus)

The SASL plug-in type that the Postfix SMTP client should use for authentication.

Available in Postfix version 2.5 and later:

smtp_sasl_auth_cache_name (empty)

An optional table to prevent repeated SASL authentication failures with the same remote SMTP server hostname, username and password.

smtp_sasl_auth_cache_time (90d)

The maximal age of an smtp_sasl_auth_cache_name entry before it is removed.

smtp_sasl_auth_soft_bounce (yes)

When a remote SMTP server rejects a SASL authentication request with a 535 reply code, defer mail delivery instead of returning mail as undeliverable.

Available in Postfix version 2.9 and later:

smtp_send_dummy_mail_auth (no)

Whether or not to append the "AUTH=<>" option to the MAIL FROM command in SASL-authenticated SMTP sessions.

## STARTTLS SUPPORT CONTROLS

```

```

Detailed information about STARTTLS configuration may be found in the TLS_README document.

smtp_tls_security_level (empty)

The default SMTP TLS security level for the Postfix SMTP client.

smtp_sasl_tls_security_options ($smtp_sasl_security_options)

The SASL authentication security options that the Postfix SMTP client uses for TLS encrypted SMTP sessions.

smtp_starttls_timeout (300s)

Time limit for Postfix SMTP client write and read operations during TLS startup and shutdown handshake procedures.

smtp_tls_CAfile (empty)

A file containing CA certificates of root CAs trusted to sign either remote SMTP server certificates or intermediate CA certificates.

smtp_tls_CApath (empty)

Directory with PEM format Certification Authority certificates that the Postfix SMTP client uses to verify a remote SMTP server certificate.

smtp_tls_cert_file (empty)

File with the Postfix SMTP client RSA certificate in PEM format.

smtp_tls_mandatory_ciphers (medium)

The minimum TLS cipher grade that the Postfix SMTP client will use with mandatory TLS encryption.

smtp_tls_exclude_ciphers (empty)

List of ciphers or cipher types to exclude from the Postfix SMTP client cipher list at all TLS security levels.

smtp_tls_mandatory_exclude_ciphers (empty)

Additional list of ciphers or cipher types to exclude from the Postfix SMTP client cipher list at mandatory TLS security levels.

smtp_tls_dcert_file (empty)

File with the Postfix SMTP client DSA certificate in PEM format.

smtp_tls_dkey_file ($smtp_tls_dcert_file)

File with the Postfix SMTP client DSA private key in PEM format.

smtp_tls_key_file ($smtp_tls_cert_file)

File with the Postfix SMTP client RSA private key in PEM format.

smtp_tls_loglevel (0)

Enable additional Postfix SMTP client logging of TLS activity.

smtp_tls_note_starttls_offer (no)

Log the hostname of a remote SMTP server that offers STARTTLS, when TLS is not already enabled for that server.

smtp_tls_policy_maps (empty)

Optional lookup tables with the Postfix SMTP client TLS security policy by next-hop destination; when a non-empty value is specified, this overrides the obsolete smtp_tls_per_site parameter.

smtp_tls_mandatory_protocols (see 'postconf -d' output)

TLS protocols that the Postfix SMTP client will use with mandatory TLS encryption.

smtp_tls_scert_verifydepth (9)

The verification depth for remote SMTP server certificates.

smtp_tls_secure_cert_match (nexthop, dot-nexthop)

How the Postfix SMTP client verifies the server certificate peername for the "secure" TLS security level.

smtp_tls_session_cache_database (empty)

Name of the file containing the optional Postfix SMTP client TLS session cache.

smtp_tls_session_cache_timeout (3600s)

The expiration time of Postfix SMTP client TLS session cache information.

smtp_tls_verify_cert_match (hostname)

How the Postfix SMTP client verifies the server certificate peername for the "verify" TLS security level.

tls_daemon_random_bytes (32)

The number of pseudo-random bytes that an smtp(8) or smtpd(8) process requests from the tlsmgr(8) server in order to seed its internal pseudo random number generator (PRNG).

tls_high_cipherlist (see 'postconf -d' output)

The OpenSSL cipherlist for "high" grade ciphers.

tls_medium_cipherlist (see 'postconf -d' output)

The OpenSSL cipherlist for "medium" or higher grade ciphers.

tls_null_cipherlist (eNULL:!aNULL)

The OpenSSL cipherlist for "NULL" grade ciphers that provide authentication without encryption.

Available in in Postfix version 2.3..3.7:

tls_low_cipherlist (see 'postconf -d' output)

The OpenSSL cipherlist for "low" or higher grade ciphers.

tls_export_cipherlist (see 'postconf -d' output)

The OpenSSL cipherlist for "export" or higher grade ciphers.

Available in Postfix version 2.4 and later:

smtp_sasl_tls_verified_security_options ($smtp_sasl_tls_security_options)

The SASL authentication security options that the Postfix SMTP client uses for TLS encrypted SMTP sessions with a verified server certificate.

Available in Postfix version 2.5 and later:

smtp_tls_fingerprint_cert_match (empty)

List of acceptable remote SMTP server certificate fingerprints for the "fingerprint" TLS security level (smtp_tls_security_level = fingerprint).

smtp_tls_fingerprint_digest (see 'postconf -d' output)

The message digest algorithm used to construct remote SMTP server certificate fingerprints.

Available in Postfix version 2.6 and later:

smtp_tls_protocols (see postconf -d output)

TLS protocols that the Postfix SMTP client will use with opportunistic TLS encryption.

smtp_tls_ciphers (medium)

The minimum TLS cipher grade that the Postfix SMTP client will use with opportunistic TLS encryption.

smtp_tls_eccert_file (empty)

File with the Postfix SMTP client ECDSA certificate in PEM format.

smtp_tls_eckey_file ($smtp_tls_eccert_file)

File with the Postfix SMTP client ECDSA private key in PEM format.

Available in Postfix version 2.7 and later:

smtp_tls_block_early_mail_reply (no)

Try to detect a mail hijacking attack based on a TLS protocol vulnerability (CVE-2009-3555), where an attacker prepends malicious HELO, MAIL, RCPT, DATA commands to a Postfix SMTP client TLS session.

Available in Postfix version 2.8 and later:

tls_disable_workarounds (see 'postconf -d' output)

List or bit-mask of OpenSSL bug work-arounds to disable.

Available in Postfix version 2.11-3.1:

tls_dane_digest_agility (on)

Configure RFC7671 DANE TLSA digest algorithm agility.

tls_dane_trust_anchor_digest_enable (yes)

Enable support for RFC 6698 (DANE TLSA) DNS records that contain digests of trust-anchors with certificate usage "2".

Available in Postfix version 2.11 and later:

smtp_tls_trust_anchor_file (empty)

Zero or more PEM-format files with trust-anchor certificates and/or public keys.

smtp_tls_force_insecure_host_tlsa_lookup (no)

Lookup the associated DANE TLSA RRset even when a hostname is not an alias and its address records lie in an unsigned zone.

tlsmgr_service_name (tlsmgr)

The name of the tlsmgr(8) service entry in master.cf.

Available in Postfix version 3.0 and later:

smtp_tls_wrappermode (no)

Request that the Postfix SMTP client connects using the SUBMISSIONS/SMTPS protocol instead of using the STARTTLS command.

Available in Postfix version 3.1 and later:

smtp_tls_dane_insecure_mx_policy (dane)

The TLS policy for MX hosts with "secure" TLSA records when the nexthop destination security level is dane, but the MX record was found via an "insecure" MX lookup.

Available in Postfix version 3.2 and later:

tls_eecdh_auto_curves (see 'postconf -d' output)

The prioritized list of elliptic curves supported by the Postfix SMTP client and server.

Available in Postfix version 3.4 and later:

smtp_tls_connection_reuse (no)

Try to make multiple deliveries per TLS-encrypted connection.

smtp_tls_chain_files (empty)

List of one or more PEM files, each holding one or more private keys directly followed by a corresponding certificate chain.

smtp_tls_servername (empty)

Optional name to send to the remote SMTP server in the TLS Server Name Indication (SNI) extension.

Available in Postfix 3.5, 3.4.6, 3.3.5, 3.2.10, 3.1.13 and later:

tls_fast_shutdown_enable (yes)

A workaround for implementations that hang Postfix while shutting down a TLS session, until Postfix times out.

Available in Postfix version 3.8 and later:

tls_ffdhe_auto_groups (see 'postconf -d' output)

The prioritized list of finite-field Diffie-Hellman ephemeral (FFDHE) key exchange groups supported by the Postfix SMTP client and server.

Available in Postfix 3.9, 3.8.1, 3.7.6, 3.6.10, 3.5.20 and later:

tls_config_file (default)

Optional configuration file with baseline OpenSSL settings.

tls_config_name (empty)

The application name passed by Postfix to OpenSSL library initialization functions.

## OBSOLETE STARTTLS CONTROLS

```

```

The following configuration parameters exist for compatibility with Postfix versions before 2.3. Support for these will be removed in a future release.

smtp_use_tls (no)

Opportunistic mode: use TLS when a remote SMTP server announces STARTTLS support, otherwise send the mail in the clear.

smtp_enforce_tls (no)

Enforcement mode: require that remote SMTP servers use TLS encryption, and never send mail in the clear.

smtp_tls_enforce_peername (yes)

With mandatory TLS encryption, require that the remote SMTP server hostname matches the information in the remote SMTP server certificate.

smtp_tls_per_site (empty)

Optional lookup tables with the Postfix SMTP client TLS usage policy by next-hop destination and by remote SMTP server hostname.

smtp_tls_cipherlist (empty)

Obsolete Postfix < 2.3 control for the Postfix SMTP client TLS cipher list.

## RESOURCE AND RATE CONTROLS

```

```

smtp_connect_timeout (30s)

The Postfix SMTP client time limit for completing a TCP connection, or zero (use the operating system built-in time limit).

smtp_helo_timeout (300s)

The Postfix SMTP client time limit for sending the HELO or EHLO command, and for receiving the initial remote SMTP server response.

lmtp_lhlo_timeout (300s)

The Postfix LMTP client time limit for sending the LHLO command, and for receiving the initial remote LMTP server response.

smtp_xforward_timeout (300s)

The Postfix SMTP client time limit for sending the XFORWARD command, and for receiving the remote SMTP server response.

smtp_mail_timeout (300s)

The Postfix SMTP client time limit for sending the MAIL FROM command, and for receiving the remote SMTP server response.

smtp_rcpt_timeout (300s)

The Postfix SMTP client time limit for sending the SMTP RCPT TO command, and for receiving the remote SMTP server response.

smtp_data_init_timeout (120s)

The Postfix SMTP client time limit for sending the SMTP DATA command, and for receiving the remote SMTP server response.

smtp_data_xfer_timeout (180s)

The Postfix SMTP client time limit for sending the SMTP message content.

smtp_data_done_timeout (600s)

The Postfix SMTP client time limit for sending the SMTP ".", and for receiving the remote SMTP server response.

smtp_quit_timeout (300s)

The Postfix SMTP client time limit for sending the QUIT command, and for receiving the remote SMTP server response.

Available in Postfix version 2.1 and later:

smtp_mx_address_limit (5)

The maximal number of MX (mail exchanger) IP addresses that can result from Postfix SMTP client mail exchanger lookups, or zero (no limit).

smtp_mx_session_limit (2)

The maximal number of SMTP sessions per delivery request before the Postfix SMTP client gives up or delivers to a fall-back relay host, or zero (no limit).

smtp_rset_timeout (20s)

The Postfix SMTP client time limit for sending the RSET command, and for receiving the remote SMTP server response.

Available in Postfix version 2.2 and earlier:

lmtp_cache_connection (yes)

Keep Postfix LMTP client connections open for up to $max_idle seconds.

Available in Postfix version 2.2 and later:

smtp_connection_cache_destinations (empty)

Permanently enable SMTP connection caching for the specified destinations.

smtp_connection_cache_on_demand (yes)

Temporarily enable SMTP connection caching while a destination has a high volume of mail in the active queue.

smtp_connection_reuse_time_limit (300s)

The amount of time during which Postfix will use an SMTP connection repeatedly.

smtp_connection_cache_time_limit (2s)

When SMTP connection caching is enabled, the amount of time that an unused SMTP client socket is kept open before it is closed.

Available in Postfix version 2.3 and later:

connection_cache_protocol_timeout (5s)

Time limit for connection cache connect, send or receive operations.

Available in Postfix version 2.9 - 3.6:

smtp_per_record_deadline (no)

Change the behavior of the smtp_*_timeout time limits, from a time limit per read or write system call, to a time limit to send or receive a complete record (an SMTP command line, SMTP response line, SMTP message content line, or TLS protocol message).

Available in Postfix version 2.11 and later:

smtp_connection_reuse_count_limit (0)

When SMTP connection caching is enabled, the number of times that an SMTP session may be reused before it is closed, or zero (no limit).

Available in Postfix version 3.4 and later:

smtp_tls_connection_reuse (no)

Try to make multiple deliveries per TLS-encrypted connection.

Available in Postfix version 3.7 and later:

smtp_per_request_deadline (no)

Change the behavior of the smtp_*_timeout time limits, from a time limit per plaintext or TLS read or write call, to a combined time limit for sending a complete SMTP request and for receiving a complete SMTP response.

smtp_min_data_rate (500)

The minimum plaintext data transfer rate in bytes/second for DATA requests, when deadlines are enabled with smtp_per_request_deadline.

Implemented in the qmgr(8) daemon:

transport_destination_concurrency_limit ($default_destination_concurrency_limit)

A transport-specific override for the default_destination_concurrency_limit parameter value, where transport is the master.cf name of the message delivery transport.

transport_destination_recipient_limit ($default_destination_recipient_limit)

A transport-specific override for the default_destination_recipient_limit parameter value, where transport is the master.cf name of the message delivery transport.

## SMTPUTF8 CONTROLS

```

```

Preliminary SMTPUTF8 support is introduced with Postfix 3.0.

smtputf8_enable (yes)

Enable preliminary SMTPUTF8 support for the protocols described in RFC 6531, RFC 6532, and RFC 6533.

smtputf8_autodetect_classes (sendmail, verify)

Detect that a message requires SMTPUTF8 support for the specified mail origin classes.

Available in Postfix version 3.2 and later:

enable_idna2003_compatibility (no)

Enable 'transitional' compatibility between IDNA2003 and IDNA2008, when converting UTF-8 domain names to/from the ASCII form that is used for DNS lookups.

## TROUBLE SHOOTING CONTROLS

```

```

debug_peer_level (2)

The increment in verbose logging level when a nexthop destination, remote client or server name or network address matches a pattern given with the debug_peer_list parameter.

debug_peer_list (empty)

Optional list of nexthop destination, remote client or server name or network address patterns that, if matched, cause the verbose logging level to increase by the amount specified in $debug_peer_level.

error_notice_recipient (postmaster)

The recipient of postmaster notifications about mail delivery problems that are caused by policy, resource, software or protocol errors.

internal_mail_filter_classes (empty)

What categories of Postfix-generated mail are subject to before-queue content inspection by non_smtpd_milters, header_checks and body_checks.

notify_classes (resource, software)

The list of error classes that are reported to the postmaster.

## MISCELLANEOUS CONTROLS

```

```

best_mx_transport (empty)

Where the Postfix SMTP client should deliver mail when it detects a "mail loops back to myself" error condition.

config_directory (see 'postconf -d' output)

The default location of the Postfix main.cf and master.cf configuration files.

daemon_timeout (18000s)

How much time a Postfix daemon process may take to handle a request before it is terminated by a built-in watchdog timer.

delay_logging_resolution_limit (2)

The maximal number of digits after the decimal point when logging sub-second delay values.

disable_dns_lookups (no)

Disable DNS lookups in the Postfix SMTP and LMTP clients.

inet_interfaces (all)

The local network interface addresses that this mail system receives mail on.

inet_protocols (any)

The Internet protocols Postfix will attempt to use when making or accepting connections.

ipc_timeout (3600s)

The time limit for sending or receiving information over an internal communication channel.

lmtp_assume_final (no)

When a remote LMTP server announces no DSN support, assume that the server performs final delivery, and send "delivered" delivery status notifications instead of "relayed".

lmtp_tcp_port (24)

The default TCP port that the Postfix LMTP client connects to.

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.

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.

proxy_interfaces (empty)

The remote network interface addresses that this mail system receives mail on by way of a proxy or network address translation unit.

smtp_address_preference (any)

The address type ("ipv6", "ipv4" or "any") that the Postfix SMTP client will try first, when a destination has IPv6 and IPv4 addresses with equal MX preference.

smtp_bind_address (empty)

An optional numerical network address that the Postfix SMTP client should bind to when making an IPv4 connection.

smtp_bind_address6 (empty)

An optional numerical network address that the Postfix SMTP client should bind to when making an IPv6 connection.

smtp_helo_name ($myhostname)

The hostname to send in the SMTP HELO or EHLO command.

lmtp_lhlo_name ($myhostname)

The hostname to send in the LMTP LHLO command.

smtp_host_lookup (dns)

What mechanisms the Postfix SMTP client uses to look up a host's IP address.

smtp_randomize_addresses (yes)

Randomize the order of equal-preference MX host addresses.

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 with Postfix 2.2 and earlier:

fallback_relay (empty)

Optional list of relay hosts for SMTP destinations that can't be found or that are unreachable.

Available with Postfix 2.3 and later:

smtp_fallback_relay ($fallback_relay)

Optional list of relay destinations that will be used when an SMTP destination is not found, or when delivery fails due to a non-permanent error.

Available with Postfix 3.0 and later:

smtp_address_verify_target (rcpt)

In the context of email address verification, the SMTP protocol stage that determines whether an email address is deliverable.

Available with Postfix 3.1 and later:

lmtp_fallback_relay (empty)

Optional list of relay hosts for LMTP destinations that can't be found or that are unreachable.

Available with Postfix 3.2 and later:

smtp_tcp_port (smtp)

The default TCP port that the Postfix SMTP client connects to.

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.7 and later:

smtp_bind_address_enforce (no)

Defer delivery when the Postfix SMTP client cannot apply the smtp_bind_address or smtp_bind_address6 setting.

## SEE ALSO

```
generic(5), output address rewriting
header_checks(5), message header content inspection
body_checks(5), body parts content inspection
qmgr(8), queue manager
bounce(8), delivery status reports
scache(8), connection cache server
postconf(5), configuration parameters
master(5), generic daemon options
master(8), process manager
tlsmgr(8), TLS session and PRNG management
postlogd(8), Postfix logging
syslogd(8), system logging
```

## README FILES

```

```

Use "postconf readme_directory" or "postconf html_directory" to locate this information.

```
SASL_README, Postfix SASL howto
TLS_README, Postfix STARTTLS howto
```

## 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
Command pipelining in cooperation with:
Jon Ribbens
Oaktree Internet Solutions Ltd.,
Internet House,
Canal Basin,
Coventry,
CV1 4LY, United Kingdom.
SASL support originally by:
Till Franke
SuSE Rhein/Main AG
65760 Eschborn, Germany
TLS support originally by:
Lutz Jaenicke
BTU Cottbus
Allgemeine Elektrotechnik
Universitaetsplatz 3-4
D-03044 Cottbus, Germany
Revised TLS and SMTP connection cache support by:
Victor Duchovni
Morgan Stanley
```


smtpd

package: postfix

title: smtpd(8)

text:
# smtpd(8)

## NAME
smtpd - Postfix SMTP server

## SYNOPSIS

```
smtpd [generic Postfix daemon options]
sendmail -bs
```

## DESCRIPTION

The SMTP server accepts network connection requests and performs zero or more SMTP transactions per connection. Each received message is piped through the cleanup(8) daemon, and is placed into the incoming queue as one single queue file. For this mode of operation, the program expects to be run from the master(8) process manager.

Alternatively, the SMTP server be can run in stand-alone mode; this is traditionally obtained with "sendmail -bs". When the SMTP server runs stand-alone with non $mail_owner privileges, it receives mail even while the mail system is not running, deposits messages directly into the maildrop queue, and disables the SMTP server's access policies. As of Postfix version 2.3, the SMTP server refuses to receive mail from the network when it runs with non $mail_owner privileges.

The SMTP server implements a variety of policies for connection requests, and for parameters given to HELO, ETRN, MAIL FROM, VRFY and RCPT TO commands. They are detailed below and in the main.cf configuration file.

## SECURITY

```

```

The SMTP server is moderately security-sensitive. It talks to SMTP clients and to DNS servers on the network. The SMTP server can be run chrooted at fixed low privilege.

## STANDARDS

```
RFC 821 (SMTP protocol)
RFC 1123 (Host requirements)
RFC 1652 (8bit-MIME transport)
RFC 1869 (SMTP service extensions)
RFC 1870 (Message size declaration)
RFC 1985 (ETRN command)
RFC 2034 (SMTP enhanced status codes)
RFC 2554 (AUTH command)
RFC 2821 (SMTP protocol)
RFC 2920 (SMTP pipelining)
RFC 3030 (CHUNKING without BINARYMIME)
RFC 3207 (STARTTLS command)
RFC 3461 (SMTP DSN extension)
RFC 3463 (Enhanced status codes)
RFC 3848 (ESMTP transmission types)
RFC 4409 (Message submission)
RFC 4954 (AUTH command)
RFC 5321 (SMTP protocol)
RFC 6531 (Internationalized SMTP)
RFC 6533 (Internationalized Delivery Status Notifications)
RFC 7505 ("Null MX" No Service Resource Record)
```

## DIAGNOSTICS

Problems and transactions are logged to syslogd(8) or postlogd(8).

Depending on the setting of the notify_classes parameter, the postmaster is notified of bounces, protocol problems, policy violations, and of other trouble.

## CONFIGURATION PARAMETERS

```

```

Changes to main.cf are picked up automatically, as smtpd(8) processes run for only a limited amount of time. Use the command "postfix reload" to speed up a change.

The text below provides only a parameter summary. See postconf(5) for more details including examples.

## COMPATIBILITY CONTROLS

```

```

The following parameters work around implementation errors in other software, and/or allow you to override standards in order to prevent undesirable use.

broken_sasl_auth_clients (no)

Enable interoperability with remote SMTP clients that implement an obsolete version of the AUTH command (RFC 4954).

disable_vrfy_command (yes)

Disable the SMTP VRFY command.

smtpd_noop_commands (empty)

List of commands that the Postfix SMTP server replies to with "250 Ok", without doing any syntax checks and without changing state.

strict_rfc821_envelopes (no)

Require that addresses received in SMTP MAIL FROM and RCPT TO commands are enclosed with <>, and that those addresses do not contain RFC 822 style comments or phrases.

Available in Postfix version 2.1 and later:

smtpd_reject_unlisted_sender (no)

Request that the Postfix SMTP server rejects mail from unknown sender addresses, even when no explicit reject_unlisted_sender access restriction is specified.

smtpd_sasl_exceptions_networks (empty)

What remote SMTP clients the Postfix SMTP server will not offer AUTH support to.

Available in Postfix version 2.2 and later:

smtpd_discard_ehlo_keyword_address_maps (empty)

Lookup tables, indexed by the remote SMTP client address, with case insensitive lists of EHLO keywords (pipelining, starttls, auth, etc.) that the Postfix SMTP server will not send in the EHLO response to a remote SMTP client.

smtpd_discard_ehlo_keywords (empty)

A case insensitive list of EHLO keywords (pipelining, starttls, auth, etc.) that the Postfix SMTP server will not send in the EHLO response to a remote SMTP client.

smtpd_delay_open_until_valid_rcpt (yes)

Postpone the start of an SMTP mail transaction until a valid RCPT TO command is received.

Available in Postfix version 2.3 and later:

smtpd_tls_always_issue_session_ids (yes)

Force the Postfix SMTP server to issue a TLS session id, even when TLS session caching is turned off (smtpd_tls_session_cache_database is empty).

Available in Postfix version 2.6 and later:

tcp_windowsize (0)

An optional workaround for routers that break TCP window scaling.

Available in Postfix version 2.7 and later:

smtpd_command_filter (empty)

A mechanism to transform commands from remote SMTP clients.

Available in Postfix version 2.9 - 3.6:

smtpd_per_record_deadline (normal: no, overload: yes)

Change the behavior of the smtpd_timeout and smtpd_starttls_timeout time limits, from a time limit per read or write system call, to a time limit to send or receive a complete record (an SMTP command line, SMTP response line, SMTP message content line, or TLS protocol message).

Available in Postfix version 3.0 and later:

smtpd_dns_reply_filter (empty)

Optional filter for Postfix SMTP server DNS lookup results.

Available in Postfix 3.5 and later:

info_log_address_format (external)

The email address form that will be used in non-debug logging (info, warning, etc.).

Available in Postfix version 3.6 and later:

smtpd_relay_before_recipient_restrictions (see 'postconf -d' output)

Evaluate smtpd_relay_restrictions before smtpd_recipient_restrictions.

known_tcp_ports (lmtp=24, smtp=25, smtps=submissions=465, submission=587)

Optional setting that avoids lookups in the services(5) database.

Available in Postfix version 3.7 and later:

smtpd_per_request_deadline (normal: no, overload: yes)

Change the behavior of the smtpd_timeout and smtpd_starttls_timeout time limits, from a time limit per plaintext or TLS read or write call, to a combined time limit for receiving a complete SMTP request and for sending a complete SMTP response.

smtpd_min_data_rate (500)

The minimum plaintext data transfer rate in bytes/second for DATA and BDAT requests, when deadlines are enabled with smtpd_per_request_deadline.

## ADDRESS REWRITING CONTROLS

```

```

See the ADDRESS_REWRITING_README document for a detailed discussion of Postfix address rewriting.

receive_override_options (empty)

Enable or disable recipient validation, built-in content filtering, or address mapping.

Available in Postfix version 2.2 and later:

local_header_rewrite_clients (permit_inet_interfaces)

Rewrite or add message headers in mail from these clients, updating incomplete addresses with the domain name in $myorigin or $mydomain, and adding missing headers.

## BEFORE-SMTPD PROXY AGENT

```

```

Available in Postfix version 2.10 and later:

smtpd_upstream_proxy_protocol (empty)

The name of the proxy protocol used by an optional before-smtpd proxy agent.

smtpd_upstream_proxy_timeout (5s)

The time limit for the proxy protocol specified with the smtpd_upstream_proxy_protocol parameter.

## AFTER QUEUE EXTERNAL CONTENT INSPECTION CONTROLS

```

```

As of version 1.0, Postfix can be configured to send new mail to an external content filter AFTER the mail is queued. This content filter is expected to inject mail back into a (Postfix or other) MTA for further delivery. See the FILTER_README document for details.

content_filter (empty)

After the message is queued, send the entire message to the specified transport:destination.

## BEFORE QUEUE EXTERNAL CONTENT INSPECTION CONTROLS

```

```

As of version 2.1, the Postfix SMTP server can be configured to send incoming mail to a real-time SMTP-based content filter BEFORE mail is queued. This content filter is expected to inject mail back into Postfix. See the SMTPD_PROXY_README document for details on how to configure and operate this feature.

smtpd_proxy_filter (empty)

The hostname and TCP port of the mail filtering proxy server.

smtpd_proxy_ehlo ($myhostname)

How the Postfix SMTP server announces itself to the proxy filter.

smtpd_proxy_options (empty)

List of options that control how the Postfix SMTP server communicates with a before-queue content filter.

smtpd_proxy_timeout (100s)

The time limit for connecting to a proxy filter and for sending or receiving information.

## BEFORE QUEUE MILTER CONTROLS

```

```

As of version 2.3, Postfix supports the Sendmail version 8 Milter (mail filter) protocol. These content filters run outside Postfix. They can inspect the SMTP command stream and the message content, and can request modifications before mail is queued. For details see the MILTER_README document.

smtpd_milters (empty)

A list of Milter (mail filter) applications for new mail that arrives via the Postfix smtpd(8) server.

milter_protocol (6)

The mail filter protocol version and optional protocol extensions for communication with a Milter application; prior to Postfix 2.6 the default protocol is 2.

milter_default_action (see 'postconf -d milter_default_action' output)

The default action when a Milter (mail filter) response is unavailable (for example, bad Postfix configuration or Milter failure).

milter_macro_daemon_name ($myhostname)

The {daemon_name} macro value for Milter (mail filter) applications.

milter_macro_v ($mail_name $mail_version)

The {v} macro value for Milter (mail filter) applications.

milter_connect_timeout (30s)

The time limit for connecting to a Milter (mail filter) application, and for negotiating protocol options.

milter_command_timeout (30s)

The time limit for sending an SMTP command to a Milter (mail filter) application, and for receiving the response.

milter_content_timeout (300s)

The time limit for sending message content to a Milter (mail filter) application, and for receiving the response.

milter_connect_macros (see 'postconf -d' output)

The macros that are sent to Milter (mail filter) applications after completion of an SMTP connection.

milter_helo_macros (see 'postconf -d' output)

The macros that are sent to Milter (mail filter) applications after the SMTP HELO or EHLO command.

milter_mail_macros (see 'postconf -d' output)

The macros that are sent to Milter (mail filter) applications after the SMTP MAIL FROM command.

milter_rcpt_macros (see 'postconf -d' output)

The macros that are sent to Milter (mail filter) applications after the SMTP RCPT TO command.

milter_data_macros (see 'postconf -d' output)

The macros that are sent to version 4 or higher Milter (mail filter) applications after the SMTP DATA command.

milter_unknown_command_macros (see 'postconf -d' output)

The macros that are sent to version 3 or higher Milter (mail filter) applications after an unknown SMTP command.

milter_end_of_header_macros (see 'postconf -d' output)

The macros that are sent to Milter (mail filter) applications after the end of the message header.

milter_end_of_data_macros (see 'postconf -d' output)

The macros that are sent to Milter (mail filter) applications after the message end-of-data.

Available in Postfix version 3.1 and later:

milter_macro_defaults (empty)

Optional list of name=value pairs that specify default values for arbitrary macros that Postfix may send to Milter applications.

Available in Postfix version 3.2 and later:

smtpd_milter_maps (empty)

Lookup tables with Milter settings per remote SMTP client IP address.

## GENERAL CONTENT INSPECTION CONTROLS

```

```

The following parameters are applicable for both built-in and external content filters.

Available in Postfix version 2.1 and later:

receive_override_options (empty)

Enable or disable recipient validation, built-in content filtering, or address mapping.

## EXTERNAL CONTENT INSPECTION CONTROLS

```

```

The following parameters are applicable for both before-queue and after-queue content filtering.

Available in Postfix version 2.1 and later:

smtpd_authorized_xforward_hosts (empty)

What remote SMTP clients are allowed to use the XFORWARD feature.

## SASL AUTHENTICATION CONTROLS

```

```

Postfix SASL support (RFC 4954) can be used to authenticate remote SMTP clients to the Postfix SMTP server, and to authenticate the Postfix SMTP client to a remote SMTP server. See the SASL_README document for details.

broken_sasl_auth_clients (no)

Enable interoperability with remote SMTP clients that implement an obsolete version of the AUTH command (RFC 4954).

smtpd_sasl_auth_enable (no)

Enable SASL authentication in the Postfix SMTP server.

smtpd_sasl_local_domain (empty)

The name of the Postfix SMTP server's local SASL authentication realm.

smtpd_sasl_security_options (noanonymous)

Postfix SMTP server SASL security options; as of Postfix 2.3 the list of available features depends on the SASL server implementation that is selected with smtpd_sasl_type.

smtpd_sender_login_maps (empty)

Optional lookup table with the SASL login names that own the sender (MAIL FROM) addresses.

Available in Postfix version 2.1 and later:

smtpd_sasl_exceptions_networks (empty)

What remote SMTP clients the Postfix SMTP server will not offer AUTH support to.

Available in Postfix version 2.1 and 2.2:

smtpd_sasl_application_name (smtpd)

The application name that the Postfix SMTP server uses for SASL server initialization.

Available in Postfix version 2.3 and later:

smtpd_sasl_authenticated_header (no)

Report the SASL authenticated user name in the smtpd(8) Received message header.

smtpd_sasl_path (smtpd)

Implementation-specific information that the Postfix SMTP server passes through to the SASL plug-in implementation that is selected with smtpd_sasl_type.

smtpd_sasl_type (cyrus)

The SASL plug-in type that the Postfix SMTP server should use for authentication.

Available in Postfix version 2.5 and later:

cyrus_sasl_config_path (empty)

Search path for Cyrus SASL application configuration files, currently used only to locate the $smtpd_sasl_path.conf file.

Available in Postfix version 2.11 and later:

smtpd_sasl_service (smtp)

The service name that is passed to the SASL plug-in that is selected with smtpd_sasl_type and smtpd_sasl_path.

Available in Postfix version 3.4 and later:

smtpd_sasl_response_limit (12288)

The maximum length of a SASL client's response to a server challenge.

Available in Postfix 3.6 and later:

smtpd_sasl_mechanism_filter (!external, static:rest)

If non-empty, a filter for the SASL mechanism names that the Postfix SMTP server will announce in the EHLO response.

## STARTTLS SUPPORT CONTROLS

```

```

Detailed information about STARTTLS configuration may be found in the TLS_README document.

smtpd_tls_security_level (empty)

The SMTP TLS security level for the Postfix SMTP server; when a non-empty value is specified, this overrides the obsolete parameters smtpd_use_tls and smtpd_enforce_tls.

smtpd_sasl_tls_security_options ($smtpd_sasl_security_options)

The SASL authentication security options that the Postfix SMTP server uses for TLS encrypted SMTP sessions.

smtpd_starttls_timeout (see 'postconf -d' output)

The time limit for Postfix SMTP server write and read operations during TLS startup and shutdown handshake procedures.

smtpd_tls_CAfile (empty)

A file containing (PEM format) CA certificates of root CAs trusted to sign either remote SMTP client certificates or intermediate CA certificates.

smtpd_tls_CApath (empty)

A directory containing (PEM format) CA certificates of root CAs trusted to sign either remote SMTP client certificates or intermediate CA certificates.

smtpd_tls_always_issue_session_ids (yes)

Force the Postfix SMTP server to issue a TLS session id, even when TLS session caching is turned off (smtpd_tls_session_cache_database is empty).

smtpd_tls_ask_ccert (no)

Ask a remote SMTP client for a client certificate.

smtpd_tls_auth_only (no)

When TLS encryption is optional in the Postfix SMTP server, do not announce or accept SASL authentication over unencrypted connections.

smtpd_tls_ccert_verifydepth (9)

The verification depth for remote SMTP client certificates.

smtpd_tls_cert_file (empty)

File with the Postfix SMTP server RSA certificate in PEM format.

smtpd_tls_exclude_ciphers (empty)

List of ciphers or cipher types to exclude from the SMTP server cipher list at all TLS security levels.

smtpd_tls_dcert_file (empty)

File with the Postfix SMTP server DSA certificate in PEM format.

smtpd_tls_dh1024_param_file (empty)

File with DH parameters that the Postfix SMTP server should use with non-export EDH ciphers.

smtpd_tls_dh512_param_file (empty)

File with DH parameters that the Postfix SMTP server should use with export-grade EDH ciphers.

smtpd_tls_dkey_file ($smtpd_tls_dcert_file)

File with the Postfix SMTP server DSA private key in PEM format.

smtpd_tls_key_file ($smtpd_tls_cert_file)

File with the Postfix SMTP server RSA private key in PEM format.

smtpd_tls_loglevel (0)

Enable additional Postfix SMTP server logging of TLS activity.

smtpd_tls_mandatory_ciphers (medium)

The minimum TLS cipher grade that the Postfix SMTP server will use with mandatory TLS encryption.

smtpd_tls_mandatory_exclude_ciphers (empty)

Additional list of ciphers or cipher types to exclude from the Postfix SMTP server cipher list at mandatory TLS security levels.

smtpd_tls_mandatory_protocols (see 'postconf -d' output)

TLS protocols accepted by the Postfix SMTP server with mandatory TLS encryption.

smtpd_tls_received_header (no)

Request that the Postfix SMTP server produces Received: message headers that include information about the protocol and cipher used, as well as the remote SMTP client CommonName and client certificate issuer CommonName.

smtpd_tls_req_ccert (no)

With mandatory TLS encryption, require a trusted remote SMTP client certificate in order to allow TLS connections to proceed.

smtpd_tls_wrappermode (no)

Run the Postfix SMTP server in TLS "wrapper" mode, instead of using the STARTTLS command.

tls_daemon_random_bytes (32)

The number of pseudo-random bytes that an smtp(8) or smtpd(8) process requests from the tlsmgr(8) server in order to seed its internal pseudo random number generator (PRNG).

tls_high_cipherlist (see 'postconf -d' output)

The OpenSSL cipherlist for "high" grade ciphers.

tls_medium_cipherlist (see 'postconf -d' output)

The OpenSSL cipherlist for "medium" or higher grade ciphers.

tls_null_cipherlist (eNULL:!aNULL)

The OpenSSL cipherlist for "NULL" grade ciphers that provide authentication without encryption.

Available in Postfix version 2.3..3.7:

tls_low_cipherlist (see 'postconf -d' output)

The OpenSSL cipherlist for "low" or higher grade ciphers.

tls_export_cipherlist (see 'postconf -d' output)

The OpenSSL cipherlist for "export" or higher grade ciphers.

Available in Postfix version 2.5 and later:

smtpd_tls_fingerprint_digest (see 'postconf -d' output)

The message digest algorithm to construct remote SMTP client-certificate fingerprints or public key fingerprints (Postfix 2.9 and later) for check_ccert_access and permit_tls_clientcerts.

Available in Postfix version 2.6 and later:

smtpd_tls_protocols (see postconf -d output)

TLS protocols accepted by the Postfix SMTP server with opportunistic TLS encryption.

smtpd_tls_ciphers (medium)

The minimum TLS cipher grade that the Postfix SMTP server will use with opportunistic TLS encryption.

smtpd_tls_eccert_file (empty)

File with the Postfix SMTP server ECDSA certificate in PEM format.

smtpd_tls_eckey_file ($smtpd_tls_eccert_file)

File with the Postfix SMTP server ECDSA private key in PEM format.

smtpd_tls_eecdh_grade (see 'postconf -d' output)

The Postfix SMTP server security grade for ephemeral elliptic-curve Diffie-Hellman (EECDH) key exchange.

tls_eecdh_strong_curve (prime256v1)

The elliptic curve used by the Postfix SMTP server for sensibly strong ephemeral ECDH key exchange.

tls_eecdh_ultra_curve (secp384r1)

The elliptic curve used by the Postfix SMTP server for maximally strong ephemeral ECDH key exchange.

Available in Postfix version 2.8 and later:

tls_preempt_cipherlist (no)

With SSLv3 and later, use the Postfix SMTP server's cipher preference order instead of the remote client's cipher preference order.

tls_disable_workarounds (see 'postconf -d' output)

List or bit-mask of OpenSSL bug work-arounds to disable.

Available in Postfix version 2.11 and later:

tlsmgr_service_name (tlsmgr)

The name of the tlsmgr(8) service entry in master.cf.

Available in Postfix version 3.0 and later:

tls_session_ticket_cipher (Postfix >= 3.0: aes-256-cbc, Postfix < 3.0: aes-128-cbc)

Algorithm used to encrypt RFC5077 TLS session tickets.

Available in Postfix version 3.2 and later:

tls_eecdh_auto_curves (see 'postconf -d' output)

The prioritized list of elliptic curves supported by the Postfix SMTP client and server.

Available in Postfix version 3.4 and later:

smtpd_tls_chain_files (empty)

List of one or more PEM files, each holding one or more private keys directly followed by a corresponding certificate chain.

tls_server_sni_maps (empty)

Optional lookup tables that map names received from remote SMTP clients via the TLS Server Name Indication (SNI) extension to the appropriate keys and certificate chains.

Available in Postfix 3.5, 3.4.6, 3.3.5, 3.2.10, 3.1.13 and later:

tls_fast_shutdown_enable (yes)

A workaround for implementations that hang Postfix while shutting down a TLS session, until Postfix times out.

Available in Postfix version 3.8 and later:

tls_ffdhe_auto_groups (see 'postconf -d' output)

The prioritized list of finite-field Diffie-Hellman ephemeral (FFDHE) key exchange groups supported by the Postfix SMTP client and server.

Available in Postfix 3.9, 3.8.1, 3.7.6, 3.6.10, 3.5.20 and later:

tls_config_file (default)

Optional configuration file with baseline OpenSSL settings.

tls_config_name (empty)

The application name passed by Postfix to OpenSSL library initialization functions.

## OBSOLETE STARTTLS CONTROLS

```

```

The following configuration parameters exist for compatibility with Postfix versions before 2.3. Support for these will be removed in a future release.

smtpd_use_tls (no)

Opportunistic TLS: announce STARTTLS support to remote SMTP clients, but do not require that clients use TLS encryption.

smtpd_enforce_tls (no)

Mandatory TLS: announce STARTTLS support to remote SMTP clients, and require that clients use TLS encryption.

smtpd_tls_cipherlist (empty)

Obsolete Postfix < 2.3 control for the Postfix SMTP server TLS cipher list.

## SMTPUTF8 CONTROLS

```

```

Preliminary SMTPUTF8 support is introduced with Postfix 3.0.

smtputf8_enable (yes)

Enable preliminary SMTPUTF8 support for the protocols described in RFC 6531, RFC 6532, and RFC 6533.

strict_smtputf8 (no)

Enable stricter enforcement of the SMTPUTF8 protocol.

smtputf8_autodetect_classes (sendmail, verify)

Detect that a message requires SMTPUTF8 support for the specified mail origin classes.

Available in Postfix version 3.2 and later:

enable_idna2003_compatibility (no)

Enable 'transitional' compatibility between IDNA2003 and IDNA2008, when converting UTF-8 domain names to/from the ASCII form that is used for DNS lookups.

## VERP SUPPORT CONTROLS

```

```

With VERP style delivery, each recipient of a message receives a customized copy of the message with his/her own recipient address encoded in the envelope sender address. The VERP_README file describes configuration and operation details of Postfix support for variable envelope return path addresses. VERP style delivery is requested with the SMTP XVERP command or with the "sendmail -V" command-line option and is available in Postfix version 1.1 and later.

default_verp_delimiters (+=)

The two default VERP delimiter characters.

verp_delimiter_filter (-=+)

The characters Postfix accepts as VERP delimiter characters on the Postfix sendmail(1) command line and in SMTP commands.

Available in Postfix version 1.1 and 2.0:

authorized_verp_clients ($mynetworks)

What remote SMTP clients are allowed to specify the XVERP command.

Available in Postfix version 2.1 and later:

smtpd_authorized_verp_clients ($authorized_verp_clients)

What remote SMTP clients are allowed to specify the XVERP command.

## TROUBLE SHOOTING CONTROLS

```

```

The DEBUG_README document describes how to debug parts of the Postfix mail system. The methods vary from making the software log a lot of detail, to running some daemon processes under control of a call tracer or debugger.

debug_peer_level (2)

The increment in verbose logging level when a nexthop destination, remote client or server name or network address matches a pattern given with the debug_peer_list parameter.

debug_peer_list (empty)

Optional list of nexthop destination, remote client or server name or network address patterns that, if matched, cause the verbose logging level to increase by the amount specified in $debug_peer_level.

error_notice_recipient (postmaster)

The recipient of postmaster notifications about mail delivery problems that are caused by policy, resource, software or protocol errors.

internal_mail_filter_classes (empty)

What categories of Postfix-generated mail are subject to before-queue content inspection by non_smtpd_milters, header_checks and body_checks.

notify_classes (resource, software)

The list of error classes that are reported to the postmaster.

smtpd_reject_footer (empty)

Optional information that is appended after each Postfix SMTP server 4XX or 5XX response.

soft_bounce (no)

Safety net to keep mail queued that would otherwise be returned to the sender.

Available in Postfix version 2.1 and later:

smtpd_authorized_xclient_hosts (empty)

What remote SMTP clients are allowed to use the XCLIENT feature.

Available in Postfix version 2.10 and later:

smtpd_log_access_permit_actions (empty)

Enable logging of the named "permit" actions in SMTP server access lists (by default, the SMTP server logs "reject" actions but not "permit" actions).

## KNOWN VERSUS UNKNOWN RECIPIENT CONTROLS

```

```

As of Postfix version 2.0, the SMTP server rejects mail for unknown recipients. This prevents the mail queue from clogging up with undeliverable MAILER-DAEMON messages. Additional information on this topic is in the LOCAL_RECIPIENT_README and ADDRESS_CLASS_README documents.

show_user_unknown_table_name (yes)

Display the name of the recipient table in the "User unknown" responses.

canonical_maps (empty)

Optional address mapping lookup tables for message headers and envelopes.

recipient_canonical_maps (empty)

Optional address mapping lookup tables for envelope and header recipient addresses.

sender_canonical_maps (empty)

Optional address mapping lookup tables for envelope and header sender addresses.

Parameters concerning known/unknown local recipients:

mydestination ($myhostname, localhost.$mydomain, localhost, $config_directory/mydestination)

The list of domains that are delivered via the $local_transport mail delivery transport.

inet_interfaces (all)

The local network interface addresses that this mail system receives mail on.

proxy_interfaces (empty)

The remote network interface addresses that this mail system receives mail on by way of a proxy or network address translation unit.

inet_protocols (any)

The Internet protocols Postfix will attempt to use when making or accepting connections.

local_recipient_maps (proxy:unix:passwd.byname $alias_maps)

Lookup tables with all names or addresses of local recipients: a recipient address is local when its domain matches $mydestination, $inet_interfaces or $proxy_interfaces.

unknown_local_recipient_reject_code (550)

The numerical Postfix SMTP server response code when a recipient address is local, and $local_recipient_maps specifies a list of lookup tables that does not match the recipient.

Parameters concerning known/unknown recipients of relay destinations:

relay_domains (Postfix >= 3.0: empty, Postfix < 3.0: $mydestination)

What destination domains (and subdomains thereof) this system will relay mail to.

relay_recipient_maps (empty)

Optional lookup tables with all valid addresses in the domains that match $relay_domains.

unknown_relay_recipient_reject_code (550)

The numerical Postfix SMTP server reply code when a recipient address matches $relay_domains, and relay_recipient_maps specifies a list of lookup tables that does not match the recipient address.

Parameters concerning known/unknown recipients in virtual alias domains:

virtual_alias_domains ($virtual_alias_maps)

Postfix is the final destination for the specified list of virtual alias domains, that is, domains for which all addresses are aliased to addresses in other local or remote domains.

virtual_alias_maps ($virtual_maps)

Optional lookup tables that alias specific mail addresses or domains to other local or remote addresses.

unknown_virtual_alias_reject_code (550)

The Postfix SMTP server reply code when a recipient address matches $virtual_alias_domains, and $virtual_alias_maps specifies a list of lookup tables that does not match the recipient address.

Parameters concerning known/unknown recipients in virtual mailbox domains:

virtual_mailbox_domains ($virtual_mailbox_maps)

Postfix is the final destination for the specified list of domains; mail is delivered via the $virtual_transport mail delivery transport.

virtual_mailbox_maps (empty)

Optional lookup tables with all valid addresses in the domains that match $virtual_mailbox_domains.

unknown_virtual_mailbox_reject_code (550)

The Postfix SMTP server reply code when a recipient address matches $virtual_mailbox_domains, and $virtual_mailbox_maps specifies a list of lookup tables that does not match the recipient address.

## RESOURCE AND RATE CONTROLS

```

```

The following parameters limit resource usage by the SMTP server and/or control client request rates.

line_length_limit (2048)

Upon input, long lines are chopped up into pieces of at most this length; upon delivery, long lines are reconstructed.

queue_minfree (0)

The minimal amount of free space in bytes in the queue file system that is needed to receive mail.

message_size_limit (10240000)

The maximal size in bytes of a message, including envelope information.

smtpd_recipient_limit (1000)

The maximal number of recipients that the Postfix SMTP server accepts per message delivery request.

smtpd_timeout (normal: 300s, overload: 10s)

When the Postfix SMTP server wants to send an SMTP server response, how long the Postfix SMTP server will wait for an underlying network write operation to complete; and when the Postfix SMTP server Postfix wants to receive an SMTP client request, how long the Postfix SMTP server will wait for an underlying network read operation to complete.

smtpd_history_flush_threshold (100)

The maximal number of lines in the Postfix SMTP server command history before it is flushed upon receipt of EHLO, RSET, or end of DATA.

Available in Postfix version 2.3 and later:

smtpd_peername_lookup (yes)

Attempt to look up the remote SMTP client hostname, and verify that the name matches the client IP address.

The per SMTP client connection count and request rate limits are implemented in co-operation with the anvil(8) service, and are available in Postfix version 2.2 and later.

smtpd_client_connection_count_limit (50)

How many simultaneous connections any client is allowed to make to this service.

smtpd_client_connection_rate_limit (0)

The maximal number of connection attempts any client is allowed to make to this service per time unit.

smtpd_client_message_rate_limit (0)

The maximal number of message delivery requests that any client is allowed to make to this service per time unit, regardless of whether or not Postfix actually accepts those messages.

smtpd_client_recipient_rate_limit (0)

The maximal number of recipient addresses that any client is allowed to send to this service per time unit, regardless of whether or not Postfix actually accepts those recipients.

smtpd_client_event_limit_exceptions ($mynetworks)

Clients that are excluded from smtpd_client_*_count/rate_limit restrictions.

Available in Postfix version 2.3 and later:

smtpd_client_new_tls_session_rate_limit (0)

The maximal number of new (i.e., uncached) TLS sessions that a remote SMTP client is allowed to negotiate with this service per time unit.

Available in Postfix version 2.9 - 3.6:

smtpd_per_record_deadline (normal: no, overload: yes)

Change the behavior of the smtpd_timeout and smtpd_starttls_timeout time limits, from a time limit per read or write system call, to a time limit to send or receive a complete record (an SMTP command line, SMTP response line, SMTP message content line, or TLS protocol message).

Available in Postfix version 3.1 and later:

smtpd_client_auth_rate_limit (0)

The maximal number of AUTH commands that any client is allowed to send to this service per time unit, regardless of whether or not Postfix actually accepts those commands.

Available in Postfix version 3.7 and later:

smtpd_per_request_deadline (normal: no, overload: yes)

Change the behavior of the smtpd_timeout and smtpd_starttls_timeout time limits, from a time limit per plaintext or TLS read or write call, to a combined time limit for receiving a complete SMTP request and for sending a complete SMTP response.

smtpd_min_data_rate (500)

The minimum plaintext data transfer rate in bytes/second for DATA and BDAT requests, when deadlines are enabled with smtpd_per_request_deadline.

header_from_format (standard)

The format of the Postfix-generated From: header.

Available in Postfix version 3.8 and later:

smtpd_client_ipv4_prefix_length (32)

Aggregate smtpd_client_*_count and smtpd_client_*_rate statistics by IPv4 network blocks with the specified network prefix.

smtpd_client_ipv6_prefix_length (84)

Aggregate smtpd_client_*_count and smtpd_client_*_rate statistics by IPv6 network blocks with the specified network prefix.

Available in Postfix 3.9, 3.8.1, 3.7.6, 3.6.10, 3.5.20 and later:

smtpd_forbid_unauth_pipelining (Postfix >= 3.9: yes)

Disconnect remote SMTP clients that violate RFC 2920 (or 5321) command pipelining constraints.

Available in Postfix 3.9, 3.8.4, 3.7.9, 3.6.13, 3.5.23 and later:

smtpd_forbid_bare_newline (Postfix < 3.9: no)

Reject or restrict input lines from an SMTP client that end in <LF> instead of the standard <CR><LF>.

smtpd_forbid_bare_newline_exclusions ($mynetworks)

Exclude the specified clients from smtpd_forbid_bare_newline enforcement.

Available in Postfix 3.9, 3.8.5, 3.7.10, 3.6.14, 3.5.24 and later:

smtpd_forbid_bare_newline_reject_code (550)

The numerical Postfix SMTP server response code when rejecting a request with "smtpd_forbid_bare_newline = reject".

## TARPIT CONTROLS

```

```

When a remote SMTP client makes errors, the Postfix SMTP server can insert delays before responding. This can help to slow down run-away software. The behavior is controlled by an error counter that counts the number of errors within an SMTP session that a client makes without delivering mail.

smtpd_error_sleep_time (1s)

With Postfix version 2.1 and later: the SMTP server response delay after a client has made more than $smtpd_soft_error_limit errors, and fewer than $smtpd_hard_error_limit errors, without delivering mail.

smtpd_soft_error_limit (10)

The number of errors a remote SMTP client is allowed to make without delivering mail before the Postfix SMTP server slows down all its responses.

smtpd_hard_error_limit (normal: 20, overload: 1)

The maximal number of errors a remote SMTP client is allowed to make without delivering mail.

smtpd_junk_command_limit (normal: 100, overload: 1)

The number of junk commands (NOOP, VRFY, ETRN or RSET) that a remote SMTP client can send before the Postfix SMTP server starts to increment the error counter with each junk command.

Available in Postfix version 2.1 and later:

smtpd_recipient_overshoot_limit (1000)

The number of recipients that a remote SMTP client can send in excess of the limit specified with $smtpd_recipient_limit, before the Postfix SMTP server increments the per-session error count for each excess recipient.

## ACCESS POLICY DELEGATION CONTROLS

```

```

As of version 2.1, Postfix can be configured to delegate access policy decisions to an external server that runs outside Postfix. See the file SMTPD_POLICY_README for more information.

smtpd_policy_service_max_idle (300s)

The time after which an idle SMTPD policy service connection is closed.

smtpd_policy_service_max_ttl (1000s)

The time after which an active SMTPD policy service connection is closed.

smtpd_policy_service_timeout (100s)

The time limit for connecting to, writing to, or receiving from a delegated SMTPD policy server.

Available in Postfix version 3.0 and later:

smtpd_policy_service_default_action (451 4.3.5 Server configuration problem)

The default action when an SMTPD policy service request fails.

smtpd_policy_service_request_limit (0)

The maximal number of requests per SMTPD policy service connection, or zero (no limit).

smtpd_policy_service_try_limit (2)

The maximal number of attempts to send an SMTPD policy service request before giving up.

smtpd_policy_service_retry_delay (1s)

The delay between attempts to resend a failed SMTPD policy service request.

Available in Postfix version 3.1 and later:

smtpd_policy_service_policy_context (empty)

Optional information that the Postfix SMTP server specifies in the "policy_context" attribute of a policy service request (originally, to share the same service endpoint among multiple check_policy_service clients).

## ACCESS CONTROLS

```

```

The SMTPD_ACCESS_README document gives an introduction to all the SMTP server access control features.

smtpd_delay_reject (yes)

Wait until the RCPT TO command before evaluating $smtpd_client_restrictions, $smtpd_helo_restrictions and $smtpd_sender_restrictions, or wait until the ETRN command before evaluating $smtpd_client_restrictions and $smtpd_helo_restrictions.

parent_domain_matches_subdomains (see 'postconf -d' output)

A list of Postfix features where the pattern "example.com" also matches subdomains of example.com, instead of requiring an explicit ".example.com" pattern.

smtpd_client_restrictions (empty)

Optional restrictions that the Postfix SMTP server applies in the context of a client connection request.

smtpd_helo_required (yes)

Require that a remote SMTP client introduces itself with the HELO or EHLO command before sending the MAIL command or other commands that require EHLO negotiation.

smtpd_helo_restrictions (empty)

Optional restrictions that the Postfix SMTP server applies in the context of a client HELO command.

smtpd_sender_restrictions (empty)

Optional restrictions that the Postfix SMTP server applies in the context of a client MAIL FROM command.

smtpd_recipient_restrictions (see 'postconf -d' output)

Optional restrictions that the Postfix SMTP server applies in the context of a client RCPT TO command, after smtpd_relay_restrictions.

smtpd_etrn_restrictions (permit_mynetworks, reject)

Optional restrictions that the Postfix SMTP server applies in the context of a client ETRN command.

allow_untrusted_routing (no)

Forward mail with sender-specified routing (user[@%!]remote[@%!]site) from untrusted clients to destinations matching $relay_domains.

smtpd_restriction_classes (empty)

User-defined aliases for groups of access restrictions.

smtpd_null_access_lookup_key (<>)

The lookup key to be used in SMTP access(5) tables instead of the null sender address.

permit_mx_backup_networks (empty)

Restrict the use of the permit_mx_backup SMTP access feature to only domains whose primary MX hosts match the listed networks.

Available in Postfix version 2.0 and later:

smtpd_data_restrictions (reject_unauth_pipelining)

Optional access restrictions that the Postfix SMTP server applies in the context of the SMTP DATA command.

smtpd_expansion_filter (see 'postconf -d' output)

What characters are allowed in $name expansions of RBL reply templates.

Available in Postfix version 2.1 and later:

smtpd_reject_unlisted_sender (no)

Request that the Postfix SMTP server rejects mail from unknown sender addresses, even when no explicit reject_unlisted_sender access restriction is specified.

smtpd_reject_unlisted_recipient (yes)

Request that the Postfix SMTP server rejects mail for unknown recipient addresses, even when no explicit reject_unlisted_recipient access restriction is specified.

Available in Postfix version 2.2 and later:

smtpd_end_of_data_restrictions (empty)

Optional access restrictions that the Postfix SMTP server applies in the context of the SMTP END-OF-DATA command.

Available in Postfix version 2.10 and later:

smtpd_relay_restrictions (permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination)

Access restrictions for mail relay control that the Postfix SMTP server applies in the context of the RCPT TO command, before smtpd_recipient_restrictions.

## SENDER AND RECIPIENT ADDRESS VERIFICATION CONTROLS

```

```

Postfix version 2.1 introduces sender and recipient address verification. This feature is implemented by sending probe email messages that are not actually delivered. This feature is requested via the reject_unverified_sender and reject_unverified_recipient access restrictions. The status of verification probes is maintained by the verify(8) server. See the file ADDRESS_VERIFICATION_README for information about how to configure and operate the Postfix sender/recipient address verification service.

address_verify_poll_count (normal: 3, overload: 1)

How many times to query the verify(8) service for the completion of an address verification request in progress.

address_verify_poll_delay (3s)

The delay between queries for the completion of an address verification request in progress.

address_verify_sender ($double_bounce_sender)

The sender address to use in address verification probes; prior to Postfix 2.5 the default was "postmaster".

unverified_sender_reject_code (450)

The numerical Postfix SMTP server response code when a recipient address is rejected by the reject_unverified_sender restriction.

unverified_recipient_reject_code (450)

The numerical Postfix SMTP server response when a recipient address is rejected by the reject_unverified_recipient restriction.

Available in Postfix version 2.6 and later:

unverified_sender_defer_code (450)

The numerical Postfix SMTP server response code when a sender address probe fails due to a temporary error condition.

unverified_recipient_defer_code (450)

The numerical Postfix SMTP server response when a recipient address probe fails due to a temporary error condition.

unverified_sender_reject_reason (empty)

The Postfix SMTP server's reply when rejecting mail with reject_unverified_sender.

unverified_recipient_reject_reason (empty)

The Postfix SMTP server's reply when rejecting mail with reject_unverified_recipient.

unverified_sender_tempfail_action ($reject_tempfail_action)

The Postfix SMTP server's action when reject_unverified_sender fails due to a temporary error condition.

unverified_recipient_tempfail_action ($reject_tempfail_action)

The Postfix SMTP server's action when reject_unverified_recipient fails due to a temporary error condition.

Available with Postfix 2.9 and later:

address_verify_sender_ttl (0s)

The time between changes in the time-dependent portion of address verification probe sender addresses.

## ACCESS CONTROL RESPONSES

```

```

The following parameters control numerical SMTP reply codes and/or text responses.

access_map_reject_code (554)

The numerical Postfix SMTP server response code for an access(5) map "reject" action.

defer_code (450)

The numerical Postfix SMTP server response code when a remote SMTP client request is rejected by the "defer" restriction.

invalid_hostname_reject_code (501)

The numerical Postfix SMTP server response code when the client HELO or EHLO command parameter is rejected by the reject_invalid_helo_hostname restriction.

maps_rbl_reject_code (554)

The numerical Postfix SMTP server response code when a remote SMTP client request is blocked by the reject_rbl_client, reject_rhsbl_client, reject_rhsbl_reverse_client, reject_rhsbl_sender or reject_rhsbl_recipient restriction.

non_fqdn_reject_code (504)

The numerical Postfix SMTP server reply code when a client request is rejected by the reject_non_fqdn_helo_hostname, reject_non_fqdn_sender or reject_non_fqdn_recipient restriction.

plaintext_reject_code (450)

The numerical Postfix SMTP server response code when a request is rejected by the reject_plaintext_session restriction.

reject_code (554)

The numerical Postfix SMTP server response code when a remote SMTP client request is rejected by the "reject" restriction.

relay_domains_reject_code (554)

The numerical Postfix SMTP server response code when a client request is rejected by the reject_unauth_destination recipient restriction.

unknown_address_reject_code (450)

The numerical response code when the Postfix SMTP server rejects a sender or recipient address because its domain is unknown.

unknown_client_reject_code (450)

The numerical Postfix SMTP server response code when a client without valid address <=> name mapping is rejected by the reject_unknown_client_hostname restriction.

unknown_hostname_reject_code (450)

The numerical Postfix SMTP server response code when the hostname specified with the HELO or EHLO command is rejected by the reject_unknown_helo_hostname restriction.

Available in Postfix version 2.0 and later:

default_rbl_reply (see 'postconf -d' output)

The default Postfix SMTP server response template for a request that is rejected by an RBL-based restriction.

multi_recipient_bounce_reject_code (550)

The numerical Postfix SMTP server response code when a remote SMTP client request is blocked by the reject_multi_recipient_bounce restriction.

rbl_reply_maps (empty)

Optional lookup tables with RBL response templates.

Available in Postfix version 2.6 and later:

access_map_defer_code (450)

The numerical Postfix SMTP server response code for an access(5) map "defer" action, including "defer_if_permit" or "defer_if_reject".

reject_tempfail_action (defer_if_permit)

The Postfix SMTP server's action when a reject-type restriction fails due to a temporary error condition.

unknown_helo_hostname_tempfail_action ($reject_tempfail_action)

The Postfix SMTP server's action when reject_unknown_helo_hostname fails due to a temporary error condition.

unknown_address_tempfail_action ($reject_tempfail_action)

The Postfix SMTP server's action when reject_unknown_sender_domain or reject_unknown_recipient_domain fail due to a temporary error condition.

## MISCELLANEOUS CONTROLS

```

```

config_directory (see 'postconf -d' output)

The default location of the Postfix main.cf and master.cf configuration files.

daemon_timeout (18000s)

How much time a Postfix daemon process may take to handle a request before it is terminated by a built-in watchdog timer.

command_directory (see 'postconf -d' output)

The location of all postfix administrative commands.

double_bounce_sender (double-bounce)

The sender address of postmaster notifications that are generated by the mail system.

ipc_timeout (3600s)

The time limit for sending or receiving information over an internal communication channel.

mail_name (Postfix)

The mail system name that is displayed in Received: headers, in the SMTP greeting banner, and in bounced mail.

mail_owner (postfix)

The UNIX system account that owns the Postfix queue and most Postfix daemon processes.

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.

myhostname (see 'postconf -d' output)

The internet hostname of this mail system.

mynetworks (see 'postconf -d' output)

The list of "trusted" remote SMTP clients that have more privileges than "strangers".

myorigin ($myhostname)

The domain name that locally-posted mail appears to come from, and that locally posted mail is delivered to.

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.

recipient_delimiter (empty)

The set of characters that can separate an email address localpart, user name, or a .forward file name from its extension.

smtpd_banner ($myhostname ESMTP $mail_name)

The text that follows the 220 status code in the SMTP greeting banner.

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.2 and later:

smtpd_forbidden_commands (CONNECT GET POST regexp:{{/^[^A-Z]/ Bogus}})

List of commands that cause the Postfix SMTP server to immediately terminate the session with a 221 code.

Available in Postfix version 2.5 and later:

smtpd_client_port_logging (no)

Enable logging of the remote SMTP client port in addition to the hostname and IP address.

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.4 and later:

smtpd_reject_footer_maps (empty)

Lookup tables, indexed by the complete Postfix SMTP server 4xx or 5xx response, with reject footer templates.

## SEE ALSO

```
anvil(8), connection/rate limiting
cleanup(8), message canonicalization
tlsmgr(8), TLS session and PRNG management
trivial-rewrite(8), address resolver
verify(8), address verification service
postconf(5), configuration parameters
master(5), generic daemon options
master(8), process manager
postlogd(8), Postfix logging
syslogd(8), system logging
```

## README FILES

```

```

Use "postconf readme_directory" or "postconf html_directory" to locate this information.

```
ADDRESS_CLASS_README, blocking unknown hosted or relay recipients
ADDRESS_REWRITING_README, Postfix address manipulation
BDAT_README, Postfix CHUNKING support
FILTER_README, external after-queue content filter
LOCAL_RECIPIENT_README, blocking unknown local recipients
MILTER_README, before-queue mail filter applications
SMTPD_ACCESS_README, built-in access policies
SMTPD_POLICY_README, external policy server
SMTPD_PROXY_README, external before-queue content filter
SASL_README, Postfix SASL howto
TLS_README, Postfix STARTTLS howto
VERP_README, Postfix XVERP extension
XCLIENT_README, Postfix XCLIENT extension
XFORWARD_README, Postfix XFORWARD extension
```

## 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
SASL support originally by:
Till Franke
SuSE Rhein/Main AG
65760 Eschborn, Germany
TLS support originally by:
Lutz Jaenicke
BTU Cottbus
Allgemeine Elektrotechnik
Universitaetsplatz 3-4
D-03044 Cottbus, Germany
Revised TLS support by:
Victor Duchovni
Morgan Stanley
```

branch: sisyphus


spawn

title: spawn(8)

text:
# spawn(8)

## NAME
spawn - Postfix external command spawner

## SYNOPSIS

```
spawn [generic Postfix daemon options] command_attributes...
```

## DESCRIPTION

The spawn(8) daemon provides the Postfix equivalent of inetd. It listens on a port as specified in the Postfix master.cf file and spawns an external command whenever a connection is established. The connection can be made over local IPC (such as UNIX-domain sockets) or over non-local IPC (such as TCP sockets). The command's standard input, output and error streams are connected directly to the communication endpoint.

This daemon expects to be run from the master(8) process manager.

## COMMAND ATTRIBUTE SYNTAX

```

```

The external command attributes are given in the master.cf file at the end of a service definition. The syntax is as follows:

user=username (required)

user=username:groupname

The external command is executed with the rights of the specified username. The software refuses to execute commands with root privileges, or with the privileges of the mail system owner. If groupname is specified, the corresponding group ID is used instead of the group ID of username.

argv=command... (required)

The command to be executed. This must be specified as the last command attribute. The command is executed directly, i.e. without interpretation of shell meta characters by a shell command interpreter.

## BUGS

In order to enforce standard Postfix process resource controls, the spawn(8) daemon runs only one external command at a time. As such, it presents a noticeable overhead by wasting precious process resources. The spawn(8) daemon is expected to be replaced by a more structural solution.

## DIAGNOSTICS

The spawn(8) daemon reports abnormal child exits. Problems are logged to syslogd(8) or postlogd(8).

## SECURITY

```

```

This program needs root privilege in order to execute external commands as the specified user. It is therefore security sensitive. However the spawn(8) daemon does not talk to the external command and thus is not vulnerable to data-driven attacks.

## CONFIGURATION PARAMETERS

```

```

Changes to main.cf are picked up automatically as spawn(8) processes run for only a limited amount of time. Use the command "postfix reload" to speed up a change.

The text below provides only a parameter summary. See postconf(5) for more details including examples.

In the text below, transport is the first field of the entry in the master.cf file.

## RESOURCE AND RATE CONTROL

```

```

transport_time_limit ($command_time_limit)

A transport-specific override for the command_time_limit parameter value, where transport is the master.cf name of the message delivery transport.

## MISCELLANEOUS

```

```

config_directory (see 'postconf -d' output)

The default location of the Postfix main.cf and master.cf configuration files.

daemon_timeout (18000s)

How much time a Postfix daemon process may take to handle a request before it is terminated by a built-in watchdog timer.

export_environment (see 'postconf -d' output)

The list of environment variables that a Postfix process will export to non-Postfix processes.

ipc_timeout (3600s)

The time limit for sending or receiving information over an internal communication channel.

mail_owner (postfix)

The UNIX system account that owns the Postfix queue and most Postfix daemon processes.

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.

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.

## SEE ALSO

```
postconf(5), configuration parameters
master(8), process manager
postlogd(8), Postfix logging
syslogd(8), system logging
```

## 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
```