# Postfix Replacements for Deprecated Features

## Purpose of this document

This document describes Postfix features that are deprecated (will be removed) or that have already been removed. It also has tips for making an existing Postfix configuration more future-proof.

Overview:

- Why deprecate?
- Deprecation process
- Deprecated features

## Why deprecate?

Sometimes, a Postfix feature needs to be replaced with a different one. To give an example:

- The initial Postfix TLS implementation used multiple boolean parameters: one parameter to enable opportunistic TLS (for example, "smtp_enforce_tls = yes") and one parameter to enable mandatory TLS (for example, "smtp_require_tls = yes").

- As we added support more features such as fingerprint, dane, and so on, we decided not to add more boolean parameters. Instead we introduced one configuration parameter to select from multiple deployment models (for example, smtp_tls_security_level = may | encrypt | dane, etc...).

Having both the "old" and "new" way to configure Postfix is convenient for existing Postfix installations, because their configuration does not break after an upgrade to a new version. Unfortunately, there are also disadvantages. Having multiple ways to do similar things is not only confusing for newcomers, it also makes Postfix harder to change.

## Deprecation process

The basic process steps are:

1. Inform humans that a feature will be removed, and suggest replacements, in logging and documentation.

2. Remove the feature, and update logging and documentation.

Disclaimer: it has taken 20 years for some features to be removed. This past is not a guarantee for the future.

## Deprecated features

The table summarizes removed or deprecated features and replacements. Click on the "obsolete feature" name for a more detailed description.

> Obsolete feature name | Warning as of version | Removed in version | Replacement
> --- | --- | --- | ---
> authorized_verp_clients | 3.11 | - | smtpd_authorized_verp_clients
> fallback_relay | 3.11 | - | smtp_fallback_relay
> lmtp_per_record_deadline | 3.11 | - | lmtp_per_request_deadline
> postscreen_blacklist_action | 3.11 | - | postscreen_denylist_action
> postscreen_dnsbl_ttl | 3.11 | - | postscreen_dnsbl_max_ttl
> postscreen_dnsbl_whitelist_threshold | 3.11 | - | postscreen_dnsbl_allowlist_threshold
> postscreen_whitelist_interfaces | 3.11 | - | postscreen_allowlist_interfaces
> smtpd_client_connection_limit_exceptions | 3.11 | - | smtpd_client_event_limit_exceptions
> smtpd_per_record_deadline | 3.11 | - | smtpd_per_request_deadline
> smtp_per_record_deadline | 3.11 | - | smtp_per_request_deadline
> tlsproxy_client_level | 3.11 | - | tlsproxy_client_security_level
> tlsproxy_client_policy | 3.11 | - | tlsproxy_client_policy_maps
> virtual_maps | 3.11 | - | virtual_alias_maps
> smtp_cname_overrides_servername | 3.11 | - | do not specify (leave at default)
> lmtp_cname_overrides_servername | 3.11 | - | do not specify (leave at default)
> xxx_tls_enforce_peername | 3.11 | - | xxx_tls_security_level
> disable_dns_lookups | 3.9 | - | smtp_dns_support_level
> xxx_use_tls | 3.9 | - | xxx_tls_security_level
> xxx_enforce_tls | 3.9 | - | xxx_tls_security_level
> xxx_per_site | 3.9 | - | xxx_policy_maps
> smtpd_tls_dh1024_param_file | 3.9 | - | do not specify (leave at default)
> smtpd_tls_eecdh_grade | 3.9 | - | do not specify (leave at default)
> permit_mx_backup | 3.9 | - | relay_domains
> check_relay_domains | 2.2 | 3.9 | permit_mynetworks, reject_unauth_destination
> reject_maps_rbl | 2.1 | 3.9 | reject_rbl_client
> permit_naked_ip_address | 2.0 | 3.9 | permit_mynetworks, permit_sasl_authenticated

### Parameters that have been renamed for consistency

The postconf(1) command logs one or more of the following:

- support for parameter "authorized_verp_clients" will be removed; instead, specify "smtpd_authorized_verp_clients"
- support for parameter "fallback_relay" will be removed; instead, specify "smtp_fallback_relay"
- support for parameter "lmtp_per_record_deadline" will be removed; instead, specify "lmtp_per_request_deadline"
- support for parameter "postscreen_blacklist_action" will be removed; instead, specify "postscreen_denylist_action"
- support for parameter "postscreen_dnsbl_ttl" will be removed; instead, specify "postscreen_dnsbl_max_ttl"
- support for parameter "postscreen_dnsbl_whitelist_threshold" will be removed; instead, specify "postscreen_dnsbl_allowlist_threshold"
- support for parameter "postscreen_whitelist_interfaces" will be removed; instead, specify "postscreen_allowlist_interfaces"
- support for parameter "smtpd_client_connection_limit_exceptions" will be removed; instead, specify "smtpd_client_event_limit_exceptions"
- support for parameter "smtp_per_record_deadline" will be removed; instead, specify "smtp_per_request_deadline"
- support for parameter "tlsproxy_client_level" will be removed; instead, specify "tlsproxy_client_security_level"
- support for parameter "tlsproxy_client_policy" will be removed; instead, specify "tlsproxy_client_policy_maps"
- support for parameter "virtual_maps" will be removed; instead, specify "virtual_alias_maps"

The above parameters have been renamed for consistency with other parameters. For backwards compatibility, the old parameter values are used as the default value for the new parameters, but they will eventually be removed to eliminate clutter and confusion

To silence these warning messages, edit main.cf or master.cf, and replace each obsolete parameter name with its replacement.

### Obsolete CNAME override for peer name configuration

The postconf(1) command logs one of the following:

- support for parameter "smtp_cname_overrides_servername" will be removed; instead, do not specify
- support for parameter "lmtp_cname_overrides_servername" will be removed; instead, do not specify

These features control whether a DNS CNAME record can override the server peer name that Postfix will use for policy lookup or for certificate verification. This behavior is disabled by default as of Postfix 2.11, because it no longer solves a real problem.

### Obsolete TLS peer name match configuration

The postconf(1) command logs one of the following:

- support for parameter "lmtp_tls_enforce_peername" will be removed; instead, specify "lmtp_tls_security_level"
- support for parameter "smtp_tls_enforce_peername" will be removed; instead, specify "smtp_tls_security_level"

There are similarly-named parameters and warnings for postscreen(8) and tlsproxy(8), but those parameters should rarely be specified by hand.

Replace obsolete configuration with its replacement:

> Goal | Obsolete configuration | Replacement configuration
> --- | --- | ---
> Enforce peer name match with server certificate | xxx_enforce_peername = yes | xxx_security_level = verify xxx_security_level = secure
> Disable peer name match with server certificate | xxx_enforce_peername = no | xxx_security_level = may xxx_security_level = encrypt

### Obsolete DNS on/off configuration

The postconf(1) command logs the following:

- support for parameter "disable_dns_lookups" will be removed; instead, specify "smtp_dns_support_level"

Replace obsolete configuration with its replacement:

> Goal | Obsolete configuration | Replacement configuration
> --- | --- | ---
> To disable DNS lookups in the Postfix SMTP/LMTP client | disable_dns_lookups = yes | smtp_dns_support_level = disabled
> To enable DNS lookups in the Postfix SMTP/LMTP client | disable_dns_lookups = no | Leave smtp_dns_support_level at the implicit default which is empty, unless you need a higher support level such as DNSSEC.

### Obsolete opportunistic TLS configuration

The postconf(1) command logs one of the following:

- support for parameter "lmtp_use_tls" will be removed; instead, specify "lmtp_tls_security_level"
- support for parameter "smtp_use_tls" will be removed; instead, specify "smtp_tls_security_level"
- support for parameter "smtpd_use_tls" will be removed; instead, specify "smtpd_tls_security_level"

There are similarly-named parameters and warnings for postscreen(8) and tlsproxy(8), but those parameters should rarely be specified by hand.

Replace obsolete configuration with its replacement:

> Goal | Obsolete configuration | Replacement configuration
> --- | --- | ---
> To turn off TLS | xxx_use_tls = no | xxx_security_level = none
> To turn on opportunistic TLS | xxx_use_tls = yes | xxx_security_level = may

### Obsolete mandatory TLS configuration

The postconf(1) command logs one of the following:

- support for parameter "lmtp_enforce_tls" will be removed; instead, specify "lmtp_tls_security_level"
- support for parameter "smtp_enforce_tls" will be removed; instead, specify "smtp_tls_security_level"
- support for parameter "smtpd_enforce_tls" will be removed; instead, specify "smtpd_tls_security_level"

There are similarly-named parameters and warnings for postscreen(8) and tlsproxy(8), but those parameters should rarely be specified by hand.

Replace obsolete configuration with its replacement:

> Goal | Obsolete configuration | Replacement configuration
> --- | --- | ---
> To turn off mandatory TLS | xxx_enforce_tls = no | xxx_security_level = may
> To turn on mandatory TLS | xxx_enforce_tls = yes | xxx_security_level = encrypt

### Obsolete TLS policy table configuration

The postconf(1) command logs one of the following:

- support for parameter "lmtp_tls_per_site" will be removed; instead, specify "lmtp_tls_policy_maps"
- support for parameter "smtp_tls_per_site" will be removed; instead, specify "smtp_tls_policy_maps"

There is similarly-named parameter and warning for tlsproxy(8), but that parameter should rarely be specified by hand.

Unfortunately, this is more than a name change: the table format has changed too, as has the table search process. There is no simple conversion of the obsolete form to its replacement.

### check_relay_domains

Depending on the Postfix version, the Postfix SMTP daemon logs following warning:

- support for restriction "check_relay_domains" has been removed in Postfix 3.9"; instead, specify "reject_unauth_destination"
- support for restriction "check_relay_domains" will be removed from Postfix; use "reject_unauth_destination" instead

This feature was removed because it would relay based on the client domain name, which is not robust.

Recommended configuration to prevent an "open relay" problem with the SMTP service on port 25:

>     main.cf:
>         smtpd_recipient_restrictions =
>             permit_mynetworks,
>             permit_sasl_authenticated,
>             reject_unauth_destination
>             ...other restrictions...

Or equivalent in smtpd_relay_restrictions.

### permit_mx_backup

The Postfix version 3.9 and later SMTP daemon logs the following warning:

- support for restriction "permit_mx_backup" will be removed from Postfix; instead, specify "relay_domains"

This feature will be removed because it is too difficult to configure recipient address validation, making Postfix a source of backscatter bounces.

To specify the domains that Postfix will provide MX backup service for, see Configuring Postfix as primary or backup MX host for a remote site.

### reject_maps_rbl

Depending on the Postfix version, the SMTP daemon logs one of the following warnings:

- support for restriction "reject_maps_rbl" has been removed in Postfix 3.9"; instead, specify "reject_rbl_client domain-name"
- support for restriction "reject_maps_rbl" will be removed from Postfix; use "reject_rbl_client domain-name" instead

This feature was replaced because "MAPS RBL" is the name of a specific reputation service. The reject_rbl_client feature provides a superset of the reject_maps_rbl functionality.

Recommended configuration:

>     main.cf:
>         smtpd_recipient_restrictions =
>             permit_mynetworks,
>             permit_sasl_authenticated,
>             reject_unauth_destination
>             reject_rbl_client domain-name
>             ...other restrictions...

Where domain-name is the domain name of a DNS reputation service.

### permit_naked_ip_address

Depending on the Postfix version, the SMTP daemon logs one of the following warnings:

- support for restriction "permit_naked_ip_address" has been removed in Postfix 3.9"; instead, specify "permit_mynetworks" or "permit_sasl_authenticated"
- restriction permit_naked_ip_address is deprecated. Use permit_mynetworks or permit_sasl_authenticated instead

This feature was removed because it was easy to get a false match when smtpd_recipient_restrictions was intended to match a remote SMTP client IP address.

Recommended configuration:

>     main.cf:
>         smtpd_recipient_restrictions =
>             permit_mynetworks,
>             permit_sasl_authenticated,
>             reject_unauth_destination
>             reject_rbl_client domain-name
>             ...other restrictions...

That is, no restriction on HELO or EHLO syntax. Such restrictions ar rarely useful nowadays.