From 426ff88c97805d5359804bcfd7186dcd2c9fbf47 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 10:42:06 +0200 Subject: Merging upstream version 3.9.0. Signed-off-by: Daniel Baumann --- conf/access | 4 +- conf/aliases | 162 +++++++++++++++++++++-------------------- conf/canonical | 49 +++++++------ conf/dynamicmaps.cf | 1 + conf/generic | 10 +-- conf/header_checks | 66 +++++++---------- conf/main.cf | 4 +- conf/post-install | 28 ++++---- conf/postfix-files | 7 ++ conf/postfix-script | 21 ++++-- conf/relocated | 10 +-- conf/virtual | 202 ++++++++++++++++++++++++++-------------------------- 12 files changed, 291 insertions(+), 273 deletions(-) (limited to 'conf') diff --git a/conf/access b/conf/access index 97892eb..6da2db2 100644 --- a/conf/access +++ b/conf/access @@ -59,7 +59,7 @@ # line that starts with whitespace continues a logi- # cal line. # -# EMAIL ADDRESS PATTERNS +# EMAIL ADDRESS PATTERNS IN INDEXED TABLES # With lookups from indexed files such as DB or DBM, or from # networked tables such as NIS, LDAP or SQL, patterns are # tried in the order as listed below: @@ -97,7 +97,7 @@ # becomes: user+foo@domain, user@domain, domain, user+foo@, # and user@. # -# HOST NAME/ADDRESS PATTERNS +# HOST NAME/ADDRESS PATTERNS IN INDEXED TABLES # With lookups from indexed files such as DB or DBM, or from # networked tables such as NIS, LDAP or SQL, the following # lookup patterns are examined in the order as listed: diff --git a/conf/aliases b/conf/aliases index 8f1a284..280c3d2 100644 --- a/conf/aliases +++ b/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) recipients; this is unlike vir- +# tual_alias_maps that apply to all recipients: +# local(8), virtual, 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/conf/canonical b/conf/canonical index 4957fcc..894fd5b 100644 --- a/conf/canonical +++ b/conf/canonical @@ -225,57 +225,56 @@ # Other parameters of interest: # # inet_interfaces (all) -# The network interface addresses that this mail sys- -# tem receives mail on. +# The local network interface addresses that this +# mail system receives mail on. # # local_header_rewrite_clients (permit_inet_interfaces) -# Rewrite message header addresses in mail from these -# clients and update incomplete addresses with the -# domain name in $myorigin or $mydomain; either don't -# rewrite message headers from other clients at all, -# or rewrite message headers and update incomplete -# addresses with the domain specified in the -# remote_header_rewrite_domain parameter. +# 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. # # proxy_interfaces (empty) -# The network interface addresses that this mail sys- -# tem receives mail on by way of a proxy or network -# address translation unit. +# The remote network interface addresses that this +# mail system receives mail on by way of a proxy or +# network address translation unit. # -# masquerade_classes (envelope_sender, header_sender, +# masquerade_classes (envelope_sender, header_sender, # header_recipient) # What addresses are subject to address masquerading. # # masquerade_domains (empty) -# Optional list of domains whose subdomain structure +# Optional list of domains whose subdomain structure # will be stripped off in email addresses. # # masquerade_exceptions (empty) -# Optional list of user names that are not subjected -# to address masquerading, even when their addresses +# Optional list of user names that are not subjected +# to address masquerading, even when their addresses # match $masquerade_domains. # # mydestination ($myhostname, localhost.$mydomain, local- # host) -# The list of domains that are delivered via the +# The list of domains that are delivered via the # $local_transport mail delivery transport. # # myorigin ($myhostname) # The domain name that locally-posted mail appears to -# come from, and that locally posted mail is deliv- +# come from, and that locally posted mail is deliv- # ered to. # # 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 "-". # # remote_header_rewrite_domain (empty) -# Don't rewrite message headers from remote clients -# at all when this parameter is empty; otherwise, re- -# write message headers and append the specified -# domain name to incomplete addresses. +# Rewrite or add message headers in mail from remote +# clients if the remote_header_rewrite_domain parame- +# ter value is non-empty, updating incomplete +# addresses with the domain specified in the +# remote_header_rewrite_domain parameter, and adding +# missing headers. # # SEE ALSO # cleanup(8), canonicalize and enqueue mail @@ -284,13 +283,13 @@ # virtual(5), virtual aliasing # # 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 # ADDRESS_REWRITING_README, address rewriting guide # # 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/conf/dynamicmaps.cf b/conf/dynamicmaps.cf index 5179f66..feeb6a1 100644 --- a/conf/dynamicmaps.cf +++ b/conf/dynamicmaps.cf @@ -2,6 +2,7 @@ cdb ${LIB_PREFIX}cdb${LIB_SUFFIX} dict_cdb_open mkmap_cdb_open ldap ${LIB_PREFIX}ldap${LIB_SUFFIX} dict_ldap_open lmdb ${LIB_PREFIX}lmdb${LIB_SUFFIX} dict_lmdb_open mkmap_lmdb_open +mongodb ${LIB_PREFIX}mongodb${LIB_SUFFIX} dict_mongodb_open mysql ${LIB_PREFIX}mysql${LIB_SUFFIX} dict_mysql_open pcre ${LIB_PREFIX}pcre${LIB_SUFFIX} dict_pcre_open pgsql ${LIB_PREFIX}pgsql${LIB_SUFFIX} dict_pgsql_open diff --git a/conf/generic b/conf/generic index f371eb9..508e44a 100644 --- a/conf/generic +++ b/conf/generic @@ -193,13 +193,13 @@ # Other parameters of interest: # # inet_interfaces (all) -# The network interface addresses that this mail sys- -# tem receives mail on. +# The local network interface addresses that this +# mail system receives mail on. # # proxy_interfaces (empty) -# The network interface addresses that this mail sys- -# tem receives mail on by way of a proxy or network -# address translation unit. +# The remote network interface addresses that this +# mail system receives mail on by way of a proxy or +# network address translation unit. # # mydestination ($myhostname, localhost.$mydomain, local- # host) diff --git a/conf/header_checks b/conf/header_checks index bcd96a9..db295d0 100644 --- a/conf/header_checks +++ b/conf/header_checks @@ -440,46 +440,32 @@ # tent-Length:, Return-Path:. # # CONFIGURATION PARAMETERS -# body_checks -# Lookup tables with content filter rules for message -# body lines. These filters see one physical line at -# a time, in chunks of at most $line_length_limit -# bytes. -# -# body_checks_size_limit -# The amount of content per message body segment -# (attachment) that is subjected to $body_checks fil- -# tering. -# -# header_checks -# -# mime_header_checks (default: $header_checks) -# -# nested_header_checks (default: $header_checks) -# Lookup tables with content filter rules for message -# header lines: respectively, these are applied to -# the initial message headers (not including MIME -# headers), to the MIME headers anywhere in the mes- -# sage, and to the initial headers of attached mes- -# sages. -# -# Note: these filters see one logical message header -# at a time, even when a message header spans multi- -# ple lines. Message headers that are longer than -# $header_size_limit characters are truncated. -# -# disable_mime_input_processing -# While receiving mail, give no special treatment to -# MIME related message headers; all text after the -# initial message headers is considered to be part of -# the message body. This means that header_checks is -# applied to all the initial message headers, and -# that body_checks is applied to the remainder of the -# message. -# -# Note: when used in this manner, body_checks will -# process a multi-line message header one line at a -# time. +# body_checks (empty) +# Optional lookup tables for content inspection as +# specified in the body_checks(5) manual page. +# +# body_checks_size_limit (51200) +# How much text in a message body segment (or attach- +# ment, if you prefer to use that term) is subjected +# to body_checks inspection. +# +# header_checks (empty) +# Optional lookup tables for content inspection of +# primary non-MIME message headers, as specified in +# the header_checks(5) manual page. +# +# mime_header_checks ($header_checks) +# Optional lookup tables for content inspection of +# MIME related message headers, as described in the +# header_checks(5) manual page. +# +# nested_header_checks ($header_checks) +# Optional lookup tables for content inspection of +# non-MIME message headers in attached messages, as +# described in the header_checks(5) manual page. +# +# disable_mime_input_processing (no) +# Turn off MIME processing while receiving mail. # # EXAMPLES # Header pattern to block attachments with bad file name diff --git a/conf/main.cf b/conf/main.cf index 2ee7996..2f4eba9 100644 --- a/conf/main.cf +++ b/conf/main.cf @@ -31,7 +31,7 @@ # # The level below is what should be used with new (not upgrade) installs. # -compatibility_level = 3.8 +compatibility_level = 3.9 # SOFT BOUNCE # @@ -452,7 +452,7 @@ unknown_local_recipient_reject_code = 550 # The mailbox_command parameter specifies the optional external # command to use instead of mailbox delivery. The command is run as # the recipient with proper HOME, SHELL and LOGNAME environment settings. -# Exception: delivery for root is done as $default_user. +# Exception: delivery for root is done as $default_privs. # # Other environment variables of interest: USER (recipient username), # EXTENSION (address extension), DOMAIN (domain part of address), diff --git a/conf/post-install b/conf/post-install index 2a7d99b..ed7c79a 100644 --- a/conf/post-install +++ b/conf/post-install @@ -205,6 +205,10 @@ # Google, Inc. # 111 8th Avenue # New York, NY 10011, USA +# +# Wietse Venema +# porcupine.org +# Amawalk, NY 10501, USA #-- umask 022 @@ -291,7 +295,7 @@ test -d "$config_directory" || { # XXX Solaris does not have "test -e". instances=`test ! -f $def_config_directory/main.cf || - $POSTCONF -c $def_config_directory -h multi_instance_directories | + $POSTCONF -qc $def_config_directory -h multi_instance_directories | sed 's/,/ /'` || exit 1 update_shared_files=1 @@ -360,7 +364,7 @@ test -f $config_directory/main.cf && { case "$junk" in "") eval unset $name;; esac - eval : \${$name=\`$POSTCONF -c $config_directory -h $name\`} || exit 1 + eval : \${$name=\`$POSTCONF -qc $config_directory -h $name\`} || exit 1 done } @@ -461,14 +465,14 @@ override= for name in $MOST_PARAMETERS do eval junk=\"\$$name\" - test "$junk" = "`$POSTCONF -c $config_directory -h $name`" || { + test "$junk" = "`$POSTCONF -qc $config_directory -h $name`" || { override=1 break } done test -n "$override" && { - $POSTCONF -c $config_directory -e \ + $POSTCONF -qc $config_directory -e \ "daemon_directory = $daemon_directory" \ "command_directory = $command_directory" \ "queue_directory = $queue_directory" \ @@ -679,13 +683,13 @@ EOF # require now is that defer and deferred are hashed because those # can contain lots of files. - found=`$POSTCONF -c $config_directory -h hash_queue_names` + found=`$POSTCONF -qc $config_directory -h hash_queue_names` missing= (echo "$found" | grep defer >/dev/null) || missing="$missing defer" (echo "$found" | grep deferred>/dev/null)|| missing="$missing deferred" test -n "$missing" && { echo fixing main.cf hash_queue_names for missing $missing - $POSTCONF -c $config_directory -e hash_queue_names="$found$missing" || + $POSTCONF -qc $config_directory -e hash_queue_names="$found$missing" || exit 1 } @@ -857,14 +861,14 @@ EOF # when IPv6 support is not compiled in. See util/sys_defs.h. test "`$POSTCONF -dh inet_protocols`" = "ipv4" || - test -n "`$POSTCONF -c $config_directory -n inet_protocols`" || { + test -n "`$POSTCONF -qc $config_directory -n inet_protocols`" || { cat </dev/null + $daemon_directory/master -t 2>/dev/null && { $FATAL the Postfix mail system is not running exit 1 @@ -244,6 +251,9 @@ check) status) + # Warn once for deprecated parameters. + $command_directory/postconf >/dev/null + $daemon_directory/master -t 2>/dev/null && { $INFO the Postfix mail system is not running exit 1 @@ -268,12 +278,12 @@ check-fatal) exit 1 } - maillog_file=`$command_directory/postconf -h maillog_file` || { + maillog_file=`$command_directory/postconf -qh maillog_file` || { $FATAL cannot execute $command_directory/postconf! exit 1 } test -n "$maillog_file" && { - $command_directory/postconf -M postlog/unix-dgram 2>/dev/null \ + $command_directory/postconf -qM postlog/unix-dgram 2>/dev/null \ | grep . >/dev/null || { $FATAL "missing 'postlog' service in master.cf - run 'postfix upgrade-configuration'" exit 1 @@ -291,6 +301,9 @@ check-fatal) check-warn) # This command is NOT part of the public interface. + # Warn once for deprecated parameters. + $command_directory/postconf >/dev/null + # Check Postfix root-owned directory owner/permissions. find $queue_directory/. $queue_directory/pid \ @@ -413,7 +426,7 @@ logrotate) for name in maillog_file maillog_file_compressor \ maillog_file_rotate_suffix do - value="`$command_directory/postconf -h $name`" + value="`$command_directory/postconf -qh $name`" case "$value" in "") $FATAL "empty '$name' parameter value - logfile rotation failed" exit 1;; diff --git a/conf/relocated b/conf/relocated index 90f63ec..5c43266 100644 --- a/conf/relocated +++ b/conf/relocated @@ -131,8 +131,8 @@ # Other parameters of interest: # # inet_interfaces (all) -# The network interface addresses that this mail sys- -# tem receives mail on. +# The local network interface addresses that this +# mail system receives mail on. # # mydestination ($myhostname, localhost.$mydomain, local- # host) @@ -145,9 +145,9 @@ # ered to. # # proxy_interfaces (empty) -# The network interface addresses that this mail sys- -# tem receives mail on by way of a proxy or network -# address translation unit. +# The remote network interface addresses that this +# mail system receives mail on by way of a proxy or +# network address translation unit. # # SEE ALSO # trivial-rewrite(8), address resolver diff --git a/conf/virtual b/conf/virtual index e99eee4..8200ca4 100644 --- a/conf/virtual +++ b/conf/virtual @@ -11,98 +11,99 @@ # postmap -q - /etc/postfix/virtual