diff --git a/postfix/HISTORY b/postfix/HISTORY
index d6754fe92..f7c730fc7 100644
--- a/postfix/HISTORY
+++ b/postfix/HISTORY
@@ -27133,3 +27133,20 @@ Apologies for any names omitted.
Usability: improved error message when master.cf specifies
a wild-card network listener (like "smtp inet ... smtpd")
while `inet_interfaces is empty. File: master/master_ent.c.
+
+ More documentation updates for local aliasing versus virtual
+ aliasing. Files: proto/aliases, proto/virtual, postfix/postfix.c.
+
+20230506
+
+ Cleanup: simplified the master code to handle an empty
+ inet_interfaces setting. it is now closer to the original
+ code. Also documented what *_inet_addr_list() functions can
+ return an empty list. Files: master/master_ent.c,
+ global/own_inet_addr_list.c.
+
+20230507
+
+ Documentation: fine tuning of text about local aliasing
+ versus virtual aliasing. Files: proto/postconf.proto,
+ proto/aliases, proto/virtual, proto/ADDRESS_REWRITING_README.html.
diff --git a/postfix/README_FILES/ADDRESS_REWRITING_README b/postfix/README_FILES/ADDRESS_REWRITING_README
index 0cd7f6ec9..6ffa3b643 100644
--- a/postfix/README_FILES/ADDRESS_REWRITING_README
+++ b/postfix/README_FILES/ADDRESS_REWRITING_README
@@ -489,8 +489,9 @@ transform " Firstname.Lastname " back into UNIX login names, although it seems
that local aliases may be a more appropriate vehicle. See the VIRTUAL_README
document for an overview of methods to host virtual domains with Postfix.
-Note: virtual aliasing (virtual_alias_maps) applies to all email deliveries,
-unlike local aliasing (alias_maps) which applies only to local(8) delivery.
+Note: virtual aliasing (virtual_alias_maps) applies to all email deliveries:
+local(8), virtual, and remote. This is unlike local aliasing (alias_maps) which
+applies only to local(8) delivery.
Virtual aliasing is disabled by default. To enable, edit the virtual_alias_maps
parameter in the main.cf file and specify one or more lookup tables, separated
@@ -706,8 +707,9 @@ implement distribution lists, or to direct mail for standard aliases such as
postmaster to real people. The table can also be used to map
"Firstname.Lastname" addresses to login names.
-Note: local aliasing (alias_maps) applies only to local(8) delivery, unlike
-virtual aliasing (virtual_alias_maps) which applies to all email deliveries.
+Note: local aliasing (alias_maps) applies only to local(8) delivery. This is
+unlike virtual aliasing (virtual_alias_maps) which applies to all email
+deliveries: local(8), virtual, and remote.
Alias lookups are enabled by default. The default configuration depends on the
operating system environment, but it is typically one of the following:
diff --git a/postfix/README_FILES/DATABASE_README b/postfix/README_FILES/DATABASE_README
index 3fd88c3e6..edf7c588f 100644
--- a/postfix/README_FILES/DATABASE_README
+++ b/postfix/README_FILES/DATABASE_README
@@ -28,7 +28,7 @@ Examples of lookup tables that appear often in the Postfix documentation:
alias_maps = hash:/etc/postfix/aliases (local aliasing)
header_checks = regexp:/etc/postfix/header_checks (content filtering)
transport_maps = hash:/etc/postfix/transport (routing table)
- virtual_alias_maps = hash:/etc/postfix/virtual (address rewriting)
+ virtual_alias_maps = hash:/etc/postfix/virtual (virtual aliasing)
All Postfix lookup tables store information as (key, value) pairs. This
interface may seem simplistic at first, but it turns out to be very powerful.
diff --git a/postfix/conf/aliases b/postfix/conf/aliases
index 8f1a28451..6849e7e1d 100644
--- a/postfix/conf/aliases
+++ b/postfix/conf/aliases
@@ -45,25 +45,29 @@ decode: root
# newaliases
#
# DESCRIPTION
-# The aliases(5) table provides a system-wide mechanism to
-# redirect mail for local recipients. The redirections are
-# processed by the Postfix local(8) delivery agent.
+# The optional aliases(5) table (alias_maps) redirects mail
+# for local recipients. The redirections are processed by
+# the Postfix local(8) delivery agent.
+#
+# This is unlike virtual(5) aliasing (virtual_alias_maps)
+# which applies to all recipients: local(8), virtual, and
+# remote, and which is implemented by the cleanup(8) daemon.
#
# Normally, the aliases(5) table is specified as a text file
-# that serves as input to the postalias(1) command. The
-# result, an indexed file in dbm or db format, is used for
-# fast lookup by the mail system. Execute the command
-# newaliases in order to rebuild the indexed file after
+# that serves as input to the postalias(1) command. The
+# result, an indexed file in dbm or db format, is used for
+# fast lookup by the mail system. Execute the command
+# newaliases in order to rebuild the indexed file after
# changing the Postfix alias database.
#
-# When the table is provided via other means such as NIS,
-# LDAP or SQL, the same lookups are done as for ordinary
+# When the table is provided via other means such as NIS,
+# LDAP or SQL, the same lookups are done as for ordinary
# indexed files.
#
-# Alternatively, the table can be provided as a regu-
-# lar-expression map where patterns are given as regular
-# expressions. In this case, the lookups are done in a
-# slightly different way as described below under "REGULAR
+# Alternatively, the table can be provided as a regu-
+# lar-expression map where patterns are given as regular
+# expressions. In this case, the lookups are done in a
+# slightly different way as described below under "REGULAR
# EXPRESSION TABLES".
#
# Users can control delivery of their own mail by setting up
@@ -77,61 +81,61 @@ decode: root
#
# name: value1, value2, ...
#
-# o Empty lines and whitespace-only lines are ignored,
-# as are lines whose first non-whitespace character
+# o Empty lines and whitespace-only lines are ignored,
+# as are lines whose first non-whitespace character
# is a `#'.
#
-# o A logical line starts with non-whitespace text. A
-# line that starts with whitespace continues a logi-
+# o A logical line starts with non-whitespace text. A
+# line that starts with whitespace continues a logi-
# cal line.
#
-# The name is a local address (no domain part). Use double
-# quotes when the name contains any special characters such
-# as whitespace, `#', `:', or `@'. The name is folded to
+# The name is a local address (no domain part). Use double
+# quotes when the name contains any special characters such
+# as whitespace, `#', `:', or `@'. The name is folded to
# lowercase, in order to make database lookups case insensi-
# tive.
#
-# In addition, when an alias exists for owner-name, this
-# will override the envelope sender address, so that deliv-
+# In addition, when an alias exists for owner-name, this
+# will override the envelope sender address, so that deliv-
# ery diagnostics are directed to owner-name, instead of the
-# originator of the message (for details, see
-# owner_request_special, expand_owner_alias and
-# reset_owner_alias). This is typically used to direct
-# delivery errors to the maintainer of a mailing list, who
+# originator of the message (for details, see
+# owner_request_special, expand_owner_alias and
+# reset_owner_alias). This is typically used to direct
+# delivery errors to the maintainer of a mailing list, who
# is in a better position to deal with mailing list delivery
# problems than the originator of the undelivered mail.
#
# The value contains one or more of the following:
#
# address
-# Mail is forwarded to address, which is compatible
+# Mail is forwarded to address, which is compatible
# with the RFC 822 standard.
#
# /file/name
-# Mail is appended to /file/name. For details on how
-# a file is written see the sections "EXTERNAL FILE
-# DELIVERY" and "DELIVERY RIGHTS" in the local(8)
-# documentation. Delivery is not limited to regular
-# files. For example, to dispose of unwanted mail,
+# Mail is appended to /file/name. For details on how
+# a file is written see the sections "EXTERNAL FILE
+# DELIVERY" and "DELIVERY RIGHTS" in the local(8)
+# documentation. Delivery is not limited to regular
+# files. For example, to dispose of unwanted mail,
# deflect it to /dev/null.
#
# |command
-# Mail is piped into command. Commands that contain
-# special characters, such as whitespace, should be
-# enclosed between double quotes. For details on how
-# a command is executed see "EXTERNAL COMMAND DELIV-
+# Mail is piped into command. Commands that contain
+# special characters, such as whitespace, should be
+# enclosed between double quotes. For details on how
+# a command is executed see "EXTERNAL COMMAND DELIV-
# ERY" and "DELIVERY RIGHTS" in the local(8) documen-
# tation.
#
# When the command fails, a limited amount of command
-# output is mailed back to the sender. The file
-# /usr/include/sysexits.h defines the expected exit
-# status codes. For example, use "|exit 67" to simu-
-# late a "user unknown" error, and "|exit 0" to
+# output is mailed back to the sender. The file
+# /usr/include/sysexits.h defines the expected exit
+# status codes. For example, use "|exit 67" to simu-
+# late a "user unknown" error, and "|exit 0" to
# implement an expensive black hole.
#
# :include:/file/name
-# Mail is sent to the destinations listed in the
+# Mail is sent to the destinations listed in the
# named file. Lines in :include: files have the same
# syntax as the right-hand side of alias entries.
#
@@ -143,12 +147,12 @@ decode: root
#
# ADDRESS EXTENSION
# When alias database search fails, and the recipient local-
-# part contains the optional recipient delimiter (e.g.,
-# user+foo), the search is repeated for the unextended
+# part contains the optional recipient delimiter (e.g.,
+# user+foo), the search is repeated for the unextended
# address (e.g., user).
#
-# The propagate_unmatched_extensions parameter controls
-# whether an unmatched address extension (+foo) is propa-
+# The propagate_unmatched_extensions parameter controls
+# whether an unmatched address extension (+foo) is propa-
# gated to the result of table lookup.
#
# CASE FOLDING
@@ -156,83 +160,85 @@ decode: root
# to lowercase before database lookup.
#
# REGULAR EXPRESSION TABLES
-# This section describes how the table lookups change when
+# This section describes how the table lookups change when
# the table is given in the form of regular expressions. For
-# a description of regular expression lookup table syntax,
-# see regexp_table(5) or pcre_table(5). NOTE: these formats
+# a description of regular expression lookup table syntax,
+# see regexp_table(5) or pcre_table(5). NOTE: these formats
# do not use ":" at the end of a pattern.
#
-# Each regular expression is applied to the entire search
-# string. Thus, a search string user+foo is not broken up
+# Each regular expression is applied to the entire search
+# string. Thus, a search string user+foo is not broken up
# into user and foo.
#
-# Regular expressions are applied in the order as specified
-# in the table, until a regular expression is found that
+# Regular expressions are applied in the order as specified
+# in the table, until a regular expression is found that
# matches the search string.
#
-# Lookup results are the same as with indexed file lookups.
-# For security reasons there is no support for $1, $2 etc.
+# Lookup results are the same as with indexed file lookups.
+# For security reasons there is no support for $1, $2 etc.
# substring interpolation.
#
# SECURITY
-# The local(8) delivery agent disallows regular expression
-# substitution of $1 etc. in alias_maps, because that would
+# The local(8) delivery agent disallows regular expression
+# substitution of $1 etc. in alias_maps, because that would
# open a security hole.
#
-# The local(8) delivery agent will silently ignore requests
-# to use the proxymap(8) server within alias_maps. Instead
-# it will open the table directly. Before Postfix version
-# 2.2, the local(8) delivery agent will terminate with a
+# The local(8) delivery agent will silently ignore requests
+# to use the proxymap(8) server within alias_maps. Instead
+# it will open the table directly. Before Postfix version
+# 2.2, the local(8) delivery agent will terminate with a
# fatal error.
#
# CONFIGURATION PARAMETERS
-# The following main.cf parameters are especially relevant.
-# The text below provides only a parameter summary. See
+# The following main.cf parameters are especially relevant.
+# The text below provides only a parameter summary. See
# postconf(5) for more details including examples.
#
# alias_database (see 'postconf -d' output)
-# The alias databases for local(8) delivery that are
+# The alias databases for local(8) delivery that are
# updated with "newaliases" or with "sendmail -bi".
#
# alias_maps (see 'postconf -d' output)
-# The alias databases that are used for local(8)
-# delivery.
+# Optional lookup tables with aliases that apply only
+# to local(8) delivery, unlike virtual_alias_maps
+# that apply to all email deliveries: local(8), vir-
+# tual, and remote.
#
# allow_mail_to_commands (alias, forward)
-# Restrict local(8) mail delivery to external com-
+# Restrict local(8) mail delivery to external com-
# mands.
#
# allow_mail_to_files (alias, forward)
-# Restrict local(8) mail delivery to external files.
+# Restrict local(8) mail delivery to external files.
#
# expand_owner_alias (no)
# When delivering to an alias "aliasname" that has an
# "owner-aliasname" companion alias, set the envelope
-# sender address to the expansion of the
+# sender address to the expansion of the
# "owner-aliasname" alias.
#
# propagate_unmatched_extensions (canonical, virtual)
-# What address lookup tables copy an address exten-
+# What address lookup tables copy an address exten-
# sion from the lookup key to the lookup result.
#
# owner_request_special (yes)
# Enable special treatment for owner-listname entries
# in the aliases(5) file, and don't split owner-list-
-# name and listname-request address localparts when
+# name and listname-request address localparts when
# the recipient_delimiter is set to "-".
#
# recipient_delimiter (empty)
-# The set of characters that can separate an email
-# address localpart, user name, or a .forward file
+# The set of characters that can separate an email
+# address localpart, user name, or a .forward file
# name from its extension.
#
# Available in Postfix version 2.3 and later:
#
# frozen_delivered_to (yes)
-# Update the local(8) delivery agent's idea of the
-# Delivered-To: address (see prepend_deliv-
-# ered_header) only once, at the start of a delivery
-# attempt; do not update the Delivered-To: address
+# Update the local(8) delivery agent's idea of the
+# Delivered-To: address (see prepend_deliv-
+# ered_header) only once, at the start of a delivery
+# attempt; do not update the Delivered-To: address
# while expanding aliases or .forward files.
#
# STANDARDS
@@ -245,12 +251,12 @@ decode: root
# postconf(5), configuration parameters
#
# README FILES
-# Use "postconf readme_directory" or "postconf html_direc-
+# Use "postconf readme_directory" or "postconf html_direc-
# tory" to locate this information.
# DATABASE_README, Postfix lookup table overview
#
# LICENSE
-# The Secure Mailer license must be distributed with this
+# The Secure Mailer license must be distributed with this
# software.
#
# AUTHOR(S)
diff --git a/postfix/conf/virtual b/postfix/conf/virtual
index e99eee488..2a764c4d0 100644
--- a/postfix/conf/virtual
+++ b/postfix/conf/virtual
@@ -11,98 +11,99 @@
# postmap -q - /etc/postfix/virtual Note: virtual aliasing (virtual_alias_maps) applies to all email
-deliveries, unlike local aliasing (alias_maps) which applies only
-to local(8) delivery.
Virtual aliasing is disabled by default. To enable, edit the virtual_alias_maps parameter in the main.cf file and @@ -1061,8 +1061,9 @@ The table can also be used to map "Firstname.Lastname" addresses to login names.
Note: local aliasing (alias_maps) applies only to local(8) -delivery, unlike virtual aliasing (virtual_alias_maps) which applies -to all email deliveries.
+delivery. This is unlike virtual aliasing (virtual_alias_maps) +which applies to all email deliveries: local(8), virtual, and remote. +Alias lookups are enabled by default. The default configuration depends on the operating system environment, but it is typically diff --git a/postfix/html/DATABASE_README.html b/postfix/html/DATABASE_README.html index b6757e2d8..1f7b183c3 100644 --- a/postfix/html/DATABASE_README.html +++ b/postfix/html/DATABASE_README.html @@ -59,7 +59,7 @@ documentation:
alias_maps = hash:/etc/postfix/aliases (local aliasing) header_checks = regexp:/etc/postfix/header_checks (content filtering) transport_maps = hash:/etc/postfix/transport (routing table) - virtual_alias_maps = hash:/etc/postfix/virtual (address rewriting) + virtual_alias_maps = hash:/etc/postfix/virtual (virtual aliasing) diff --git a/postfix/html/aliases.5.html b/postfix/html/aliases.5.html index 27cfe6904..5df15e069 100644 --- a/postfix/html/aliases.5.html +++ b/postfix/html/aliases.5.html @@ -14,9 +14,13 @@ ALIASES(5) ALIASES(5) newaliases DESCRIPTION - The aliases(5) table provides a system-wide mechanism to redirect mail - for local recipients. The redirections are processed by the Postfix - local(8) delivery agent. + The optional aliases(5) table (alias_maps) redirects mail for local + recipients. The redirections are processed by the Postfix local(8) + delivery agent. + + This is unlike virtual(5) aliasing (virtual_alias_maps) which applies + to all recipients: local(8), virtual, and remote, and which is imple- + mented by the cleanup(8) daemon. Normally, the aliases(5) table is specified as a text file that serves as input to the postalias(1) command. The result, an indexed file in @@ -144,7 +148,9 @@ ALIASES(5) ALIASES(5) "newaliases" or with "sendmail -bi". alias_maps (see 'postconf -d' output) - The alias databases that are used for local(8) delivery. + Optional lookup tables with aliases that apply only to local(8) + delivery, unlike virtual_alias_maps that apply to all email + deliveries: local(8), virtual, and remote. allow_mail_to_commands (alias, forward) Restrict local(8) mail delivery to external commands. diff --git a/postfix/html/cleanup.8.html b/postfix/html/cleanup.8.html index f2450bc05..05f32cd4e 100644 --- a/postfix/html/cleanup.8.html +++ b/postfix/html/cleanup.8.html @@ -344,8 +344,8 @@ CLEANUP(8) CLEANUP(8) virtual_alias_maps ($virtual_maps) Optional lookup tables with aliases that apply to all email - deliveries, unlike alias_maps that apply only to local(8) deliv- - ery. + deliveries: local(8), virtual, and remote, unlike alias_maps + that apply only to local(8) delivery. Available in Postfix version 2.2 and later: diff --git a/postfix/html/local.8.html b/postfix/html/local.8.html index 056376fd6..4c3d4a9f9 100644 --- a/postfix/html/local.8.html +++ b/postfix/html/local.8.html @@ -384,7 +384,7 @@ LOCAL(8) LOCAL(8) alias_maps (see 'postconf -d' output) Optional lookup tables with aliases that apply only to local(8) delivery, unlike virtual_alias_maps that apply to all email - deliveries. + deliveries: local(8), virtual, and remote. forward_path (see 'postconf -d' output) The local(8) delivery agent search list for finding a .forward diff --git a/postfix/html/postconf.5.html b/postfix/html/postconf.5.html index 7360f4077..af20b7679 100644 --- a/postfix/html/postconf.5.html +++ b/postfix/html/postconf.5.html @@ -613,7 +613,8 @@ Examples:Optional lookup tables with aliases that apply only to local(8) -delivery, unlike virtual_alias_maps that apply to all email deliveries. +delivery, unlike virtual_alias_maps that apply to all email deliveries: +local(8), virtual, and remote. The table format and lookups are documented in aliases(5). For an overview of Postfix address manipulations see the ADDRESS_REWRITING_README document.
@@ -21619,8 +21620,9 @@ This feature is available in Postfix 2.1 and later. (default: $virtual_maps)-Optional lookup tables with aliases that apply to all email deliveries, -unlike alias_maps that apply only to local(8) delivery. +Optional lookup tables with aliases that apply to all email deliveries: +local(8), virtual, and remote, unlike alias_maps that apply only +to local(8) delivery. The table format and lookups are documented in virtual(5). For an overview of Postfix address manipulations see the ADDRESS_REWRITING_README document. diff --git a/postfix/html/postfix-manuals.html b/postfix/html/postfix-manuals.html index e88e88ec4..936ecae8f 100644 --- a/postfix/html/postfix-manuals.html +++ b/postfix/html/postfix-manuals.html @@ -135,7 +135,7 @@ the following convention:
Note: virtual aliasing (virtual_alias_maps) applies to all email -deliveries, unlike local aliasing (alias_maps) which applies only -to local(8) delivery.
+deliveries: local(8), virtual, and remote. This is unlike local +aliasing (alias_maps) which applies only to local(8) delivery.Virtual aliasing is disabled by default. To enable, edit the virtual_alias_maps parameter in the main.cf file and @@ -1061,8 +1061,9 @@ The table can also be used to map "Firstname.Lastname" addresses to login names.
Note: local aliasing (alias_maps) applies only to local(8) -delivery, unlike virtual aliasing (virtual_alias_maps) which applies -to all email deliveries.
+delivery. This is unlike virtual aliasing (virtual_alias_maps) +which applies to all email deliveries: local(8), virtual, and remote. +Alias lookups are enabled by default. The default configuration depends on the operating system environment, but it is typically diff --git a/postfix/proto/DATABASE_README.html b/postfix/proto/DATABASE_README.html index 2302cc354..cb25f35bb 100644 --- a/postfix/proto/DATABASE_README.html +++ b/postfix/proto/DATABASE_README.html @@ -59,7 +59,7 @@ documentation:
alias_maps = hash:/etc/postfix/aliases (local aliasing) header_checks = regexp:/etc/postfix/header_checks (content filtering) transport_maps = hash:/etc/postfix/transport (routing table) - virtual_alias_maps = hash:/etc/postfix/virtual (address rewriting) + virtual_alias_maps = hash:/etc/postfix/virtual (virtual aliasing) diff --git a/postfix/proto/aliases b/postfix/proto/aliases index d2d3f19b5..1f6a0ed29 100644 --- a/postfix/proto/aliases +++ b/postfix/proto/aliases @@ -7,9 +7,13 @@ # .fi # \fBnewaliases\fR # DESCRIPTION -# The \fBaliases\fR(5) table provides a system-wide mechanism to -# redirect mail for local recipients. The redirections are -# processed by the Postfix \fBlocal\fR(8) delivery agent. +# The optional \fBaliases\fR(5) table (alias_maps) redirects +# mail for local recipients. The redirections are processed +# by the Postfix \fBlocal\fR(8) delivery agent. +# +# This is unlike \fBvirtual\fR(5) aliasing (virtual_alias_maps) +# which applies to all recipients: local(8), virtual, and remote, +# and which is implemented by the \fBcleanup\fR(8) daemon. # # Normally, the \fBaliases\fR(5) table is specified as a text file # that serves as input to the \fBpostalias\fR(1) command. The @@ -149,7 +153,9 @@ # The alias databases for \fBlocal\fR(8) delivery that are updated with # "\fBnewaliases\fR" or with "\fBsendmail -bi\fR". # .IP "\fBalias_maps (see 'postconf -d' output)\fR" -# The alias databases that are used for \fBlocal\fR(8) delivery. +# Optional lookup tables with aliases that apply only to \fBlocal\fR(8) +# delivery, unlike virtual_alias_maps that apply to all email deliveries: +# \fBlocal\fR(8), virtual, and remote. # .IP "\fBallow_mail_to_commands (alias, forward)\fR" # Restrict \fBlocal\fR(8) mail delivery to external commands. # .IP "\fBallow_mail_to_files (alias, forward)\fR" diff --git a/postfix/proto/postconf.proto b/postfix/proto/postconf.proto index 21578242c..9d03bcb65 100644 --- a/postfix/proto/postconf.proto +++ b/postfix/proto/postconf.proto @@ -490,7 +490,8 @@ alias_database = hash:/etc/mail/aliasesOptional lookup tables with aliases that apply only to local(8) -delivery, unlike virtual_alias_maps that apply to all email deliveries. +delivery, unlike virtual_alias_maps that apply to all email deliveries: +local(8), virtual, and remote. The table format and lookups are documented in aliases(5). For an overview of Postfix address manipulations see the ADDRESS_REWRITING_README document.
@@ -7284,8 +7285,9 @@ This feature is available in Postfix 2.1 and later. %PARAM virtual_alias_maps $virtual_maps-Optional lookup tables with aliases that apply to all email deliveries, -unlike alias_maps that apply only to local(8) delivery. +Optional lookup tables with aliases that apply to all email deliveries: +local(8), virtual, and remote, unlike alias_maps that apply only +to local(8) delivery. The table format and lookups are documented in virtual(5). For an overview of Postfix address manipulations see the ADDRESS_REWRITING_README document. diff --git a/postfix/proto/stop.double-history b/postfix/proto/stop.double-history index 5c4930204..0327ec379 100644 --- a/postfix/proto/stop.double-history +++ b/postfix/proto/stop.double-history @@ -45,3 +45,6 @@ proto proto ADDRESS_REWRITING_README html cleanup cleanup c local local c smtpd smtpd c cleanup cleanup c local local c smtpd smtpd c cleanup cleanup c local local c smtpd smtpd c + postfix postfix c + aliasing Files proto aliases proto virtual postfix postfix c +proto proto aliases proto virtual proto ADDRESS_REWRITING_README html diff --git a/postfix/proto/stop.double-proto-html b/postfix/proto/stop.double-proto-html index c216f9598..f89992e13 100644 --- a/postfix/proto/stop.double-proto-html +++ b/postfix/proto/stop.double-proto-html @@ -246,3 +246,4 @@ dt dt b name value b Postfix ge 3 0 dt parametername stress something something Other p Note on OpenBSD systems specify dev dev arandom when dev dev urandom user3 example net smtp smtp relay example net submission + virtual_alias_maps hash etc postfix virtual virtual aliasing diff --git a/postfix/proto/virtual b/postfix/proto/virtual index 6e328817c..670f570e0 100644 --- a/postfix/proto/virtual +++ b/postfix/proto/virtual @@ -10,13 +10,14 @@ # # \fBpostmap -q - /etc/postfix/virtual <\fIinputfile\fR # DESCRIPTION -# The optional \fBvirtual\fR(5) alias table rewrites recipient -# addresses for all local, all virtual, and all remote mail -# destinations. -# This is unlike the \fBaliases\fR(5) table which is used -# only for \fBlocal\fR(8) delivery. This feature is implemented +# The optional \fBvirtual\fR(5) alias table (virtual_alias_maps) +# rewrites all recipients: local(8), virtual, and remote. +# This feature is implemented # in the Postfix \fBcleanup\fR(8) daemon before mail is queued. # +# This is unlike the \fBaliases\fR(5) table (alias_maps) which +# is used only for \fBlocal\fR(8) delivery. +# # Virtual aliasing is recursive; to terminate recursion for # a specific address, alias that address to itself. # @@ -244,8 +245,9 @@ # and for default values. Use the "\fBpostfix reload\fR" command after # a configuration change. # .IP "\fBvirtual_alias_maps ($virtual_maps)\fR" -# Optional lookup tables that alias specific mail addresses or domains -# to other local or remote addresses. +# Optional lookup tables with aliases that apply to all email deliveries: +# \fBlocal\fR(8), virtual, and remote, unlike alias_maps that apply only +# to \fBlocal\fR(8) delivery. # .IP "\fBvirtual_alias_domains ($virtual_alias_maps)\fR" # Postfix is the final destination for the specified list of virtual # alias domains, that is, domains for which all addresses are aliased @@ -256,7 +258,7 @@ # .PP # Other parameters of interest: # .IP "\fBinet_interfaces (all)\fR" -# The network interface addresses that this mail system receives +# The local network interface addresses that this mail system receives # mail on. # .IP "\fBmydestination ($myhostname, localhost.$mydomain, localhost)\fR" # The list of domains that are delivered via the $local_transport @@ -270,7 +272,7 @@ # \fIlistname\fR-request address localparts when the recipient_delimiter # is set to "-". # .IP "\fBproxy_interfaces (empty)\fR" -# The network interface addresses that this mail system receives mail +# The remote network interface addresses that this mail system receives mail # on by way of a proxy or network address translation unit. # SEE ALSO # cleanup(8), canonicalize and enqueue mail diff --git a/postfix/src/cleanup/cleanup.c b/postfix/src/cleanup/cleanup.c index 9229778d3..6346c4fad 100644 --- a/postfix/src/cleanup/cleanup.c +++ b/postfix/src/cleanup/cleanup.c @@ -295,8 +295,9 @@ /* .PP /* Available in Postfix version 2.0 and later: /* .IP "\fBvirtual_alias_maps ($virtual_maps)\fR" -/* Optional lookup tables with aliases that apply to all email deliveries, -/* unlike alias_maps that apply only to \fBlocal\fR(8) delivery. +/* Optional lookup tables with aliases that apply to all email deliveries: +/* \fBlocal\fR(8), virtual, and remote, unlike alias_maps that apply only +/* to \fBlocal\fR(8) delivery. /* .PP /* Available in Postfix version 2.2 and later: /* .IP "\fBcanonical_classes (envelope_sender, envelope_recipient, header_sender, header_recipient)\fR" diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 02078e7bf..1fd879e89 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -20,7 +20,7 @@ * Patches change both the patchlevel and the release date. Snapshots have no * patchlevel; they change the release date only. */ -#define MAIL_RELEASE_DATE "20230505" +#define MAIL_RELEASE_DATE "20230507" #define MAIL_VERSION_NUMBER "3.9" #ifdef SNAPSHOT diff --git a/postfix/src/global/wildcard_inet_addr.c b/postfix/src/global/wildcard_inet_addr.c index 97f6c4676..0a3c37ad8 100644 --- a/postfix/src/global/wildcard_inet_addr.c +++ b/postfix/src/global/wildcard_inet_addr.c @@ -11,7 +11,7 @@ /* wildcard_inet_addr() determines all wild-card addresses /* for all supported address families. /* DIAGNOSTICS -/* Fatal errors: out of memory. +/* Fatal errors: out of memory; no wildcard addresses. /* SEE ALSO /* inet_addr_list(3) address list management /* LICENSE diff --git a/postfix/src/local/local.c b/postfix/src/local/local.c index 7d5f4fda9..ca03e8086 100644 --- a/postfix/src/local/local.c +++ b/postfix/src/local/local.c @@ -414,7 +414,8 @@ /* fallback_transport, and luser_relay. /* .IP "\fBalias_maps (see 'postconf -d' output)\fR" /* Optional lookup tables with aliases that apply only to \fBlocal\fR(8) -/* delivery, unlike virtual_alias_maps that apply to all email deliveries. +/* delivery, unlike virtual_alias_maps that apply to all email deliveries: +/* \fBlocal\fR(8), virtual, and remote. /* .IP "\fBforward_path (see 'postconf -d' output)\fR" /* The \fBlocal\fR(8) delivery agent search list for finding a .forward /* file with user-specified delivery methods. diff --git a/postfix/src/master/master_ent.c b/postfix/src/master/master_ent.c index 1fb99cf10..98f84040d 100644 --- a/postfix/src/master/master_ent.c +++ b/postfix/src/master/master_ent.c @@ -367,17 +367,14 @@ MASTER_SERV *get_master_ent() inet_addr_list_uniq(MASTER_INET_ADDRLIST(serv)); serv->listen_fd_count = MASTER_INET_ADDRLIST(serv)->used; } else { - if (strcasecmp(saved_interfaces, INET_INTERFACES_ALL) == 0) { - MASTER_INET_ADDRLIST(serv) = wildcard_inet_addr_list(); - /* Errors, and no interface found, are fatal. */ - } else { - MASTER_INET_ADDRLIST(serv) = own_inet_addr_list(); - /* Errors are fatal, but inet_interfaces can be empty. */ - if (MASTER_INET_ADDRLIST(serv)->used == 0) - fatal_with_context("service definition requires valid" - " host name or address, or non-empty" - " %s setting", VAR_INET_INTERFACES); - } + MASTER_INET_ADDRLIST(serv) = + strcasecmp(saved_interfaces, INET_INTERFACES_ALL) ? + own_inet_addr_list() : /* result can be empty */ + wildcard_inet_addr_list(); /* result can't be empty */ + if (MASTER_INET_ADDRLIST(serv)->used == 0) + fatal_with_context("service definition requires valid" + " host name or address, or non-empty" + " %s setting", VAR_INET_INTERFACES); inet_addr_list_uniq(MASTER_INET_ADDRLIST(serv)); serv->listen_fd_count = MASTER_INET_ADDRLIST(serv)->used; } diff --git a/postfix/src/postfix/postfix.c b/postfix/src/postfix/postfix.c index c7f8b40ad..4f9f87d97 100644 --- a/postfix/src/postfix/postfix.c +++ b/postfix/src/postfix/postfix.c @@ -303,7 +303,7 @@ /* /* Table-driven mechanisms: /* access(5), Postfix SMTP access control table -/* aliases(5), Postfix alias database +/* aliases(5), Postfix local aliasing /* canonical(5), Postfix input address rewriting /* generic(5), Postfix output address rewriting /* header_checks(5), body_checks(5), Postfix content inspection diff --git a/postfix/src/smtpd/smtpd.c b/postfix/src/smtpd/smtpd.c index ac800db42..44c3694f3 100644 --- a/postfix/src/smtpd/smtpd.c +++ b/postfix/src/smtpd/smtpd.c @@ -691,8 +691,9 @@ /* alias domains, that is, domains for which all addresses are aliased /* to addresses in other local or remote domains. /* .IP "\fBvirtual_alias_maps ($virtual_maps)\fR" -/* Optional lookup tables with aliases that apply to all email deliveries, -/* unlike alias_maps that apply only to \fBlocal\fR(8) delivery. +/* Optional lookup tables with aliases that apply to all email deliveries: +/* \fBlocal\fR(8), virtual, and remote, unlike alias_maps that apply only +/* to \fBlocal\fR(8) delivery. /* .IP "\fBunknown_virtual_alias_reject_code (550)\fR" /* The Postfix SMTP server reply code when a recipient address matches /* $virtual_alias_domains, and $virtual_alias_maps specifies a list