From: Wietse Venema Date: Sat, 8 Oct 2016 05:00:00 +0000 (-0500) Subject: postfix-3.2-20161008 X-Git-Tag: v3.2.0-RC1~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fac73c7bea59ffed2cff54ed288225b541d4fae4;p=thirdparty%2Fpostfix.git postfix-3.2-20161008 --- diff --git a/postfix/HISTORY b/postfix/HISTORY index 15e4052cf..cae5b09da 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -22514,8 +22514,26 @@ Apologies for any names omitted. Bugfix (introduced: Postfix 2.11): changed the default MySQL option_group value to "client" to enable the reading of "client" option group settings in the MySQL option file. + This fixes false "not found" errors with Postfix queries + that contain UTF8-encoded text. Fix by John Fawcett. Specify an empty option_group value to get backwards-compatible - behavior. This fixes a "not found" problem with Postfix - queries that contain UTF8-encoded non-ASCII text. Based - on a fix by John Fawcett. Files: global/dict_mysql.c, - proto/mysql_table. + behavior. Files: global/dict_mysql.c, proto/mysql_table. + +20161007 + + Bitrot: API for the ersatz inet_ntop() function, when + compiling with -DNO_IPV6 (which exists only for debugging). + Files: util/sys_defs.h, util/sys_compat.c. + +20161008 + + Feature: smtp_tcp_port, similar to the existing lmtp_tcp_port. + Files: mantools/postlink, proto/postconf.proto, + global/mail_params.h, smtp/smtp.c, smtp/smtp_connect.c, + smtp/smtp_params.c. + + Feature: "PASS" and "STRIP" actions in header/body_checks. + "STRIP" is similar to "IGNORE" but also logs the action, + and "PASS" disables header, body, and Milter inspection for + the remainder of the message content. Contributed by Hobbit. + Files: cleanup/cleanup_message.c, global/header_body_checks.c. diff --git a/postfix/INSTALL b/postfix/INSTALL index d9ccf7a35..6d663c4c3 100644 --- a/postfix/INSTALL +++ b/postfix/INSTALL @@ -565,9 +565,11 @@ The following is an extensive list of names and values. ||_____________________________|______________________________________________| || |Do not build with IPv6 support. By default, | || |IPv6 support is compiled in on platforms that | -||-DNO_IPV6 |are known to have IPv6 support. Note: this | -|| |directive is for debugging and testing only. | +|| |are known to have IPv6 support. Note: this | +||-DNO_IPV6 |directive is for debugging And testing only. | || |It is not guaranteed to work on all platforms.| +|| |If you don't want IPv6 support, set | +|| |"inet_protocols = ipv4" in main.cf. | ||_____________________________|______________________________________________| || |Do not build with FreeBSD / NetBSD / OpenBSD /| ||-DNO_KQUEUE |MacOSX KQUEUE support. By default, KQUEUE | diff --git a/postfix/README_FILES/INSTALL b/postfix/README_FILES/INSTALL index 4854b2fff..4ac6493fd 100644 --- a/postfix/README_FILES/INSTALL +++ b/postfix/README_FILES/INSTALL @@ -565,9 +565,11 @@ The following is an extensive list of names and values. |_|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | || |Do not build with IPv6 support. By default, | || |IPv6 support is compiled in on platforms that | -||-DNO_IPV6 |are known to have IPv6 support. Note: this | -|| |directive is for debugging and testing only. | +|| |are known to have IPv6 support. Note: this | +||-DNO_IPV6 |directive is for debugging And testing only. | || |It is not guaranteed to work on all platforms.| +|| |If you don't want IPv6 support, set | +|| |"inet_protocols = ipv4" in main.cf. | |_|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | || |Do not build with FreeBSD / NetBSD / OpenBSD /| ||-DNO_KQUEUE |MacOSX KQUEUE support. By default, KQUEUE | diff --git a/postfix/README_FILES/MYSQL_README b/postfix/README_FILES/MYSQL_README index ec94785b4..b8304c221 100644 --- a/postfix/README_FILES/MYSQL_README +++ b/postfix/README_FILES/MYSQL_README @@ -94,7 +94,8 @@ where_field = alias # Don't forget the leading "AND"! additional_conditions = AND status = 'paid' -# For Postfix 2.11 .. 3.1. This is the default as of Postfix 3.2. +# This is necessary to make UTF8 queries work for Postfix 2.11 .. 3.1, +# and is the default setting as of Postfix 3.2. option_group = client AAddddiittiioonnaall nnootteess diff --git a/postfix/README_FILES/SMTPUTF8_README b/postfix/README_FILES/SMTPUTF8_README index 68fb6c26f..dde8251ce 100644 --- a/postfix/README_FILES/SMTPUTF8_README +++ b/postfix/README_FILES/SMTPUTF8_README @@ -60,6 +60,10 @@ main.cf: # ppoossttccoonnff ""ssmmttppuuttff88__eennaabbllee == yyeess"" # ppoossttffiixx rreellooaadd +(With Postfix <= 3.1, you may also need to specify "ooppttiioonn__ggrroouupp == cclliieenntt" in +Postfix MySQL client files, to enable UTF8 support in MySQL queries. This +setting is the default as of Postfix 3.2.) + With SMTPUTF8 support enabled, Postfix changes behavior with respect to earlier Postfix releases: diff --git a/postfix/WISHLIST b/postfix/WISHLIST index 1df78719e..97482e1d9 100644 --- a/postfix/WISHLIST +++ b/postfix/WISHLIST @@ -9,6 +9,9 @@ Wish list: Why does postqueue show UTC time, even if TZ is set in the import_environment setting? + Add a header_body_checks extension callback in smtp_proto.c + that implements the PASS action. + Propagate SMTPD_PEER_CODE_XXX from smtpd(8) to cleanup(8), so that {client_resolve} and {_} produce consistent results. diff --git a/postfix/conf/header_checks b/postfix/conf/header_checks index d5984370f..bcd96a97a 100644 --- a/postfix/conf/header_checks +++ b/postfix/conf/header_checks @@ -287,37 +287,52 @@ # checks. # # IGNORE Delete the current line from the input, and inspect -# the next input line. +# the next input line. See STRIP for an alternative +# that logs the action. # # INFO optional text... # Log an "info:" record with the optional text... (or -# log a generic text), and inspect the next input -# line. This action is useful for routine logging or +# log a generic text), and inspect the next input +# line. This action is useful for routine logging or # for debugging. # # This feature is available in Postfix 2.8 and later. # +# PASS optional text... +# Log a "pass:" record with the optional text... (or +# log a generic text), and turn off header, body, and +# Milter inspection for the remainder of this mes- +# sage. +# +# Note: this feature relies on trust in information +# that is easy to forge. +# +# This feature is available in Postfix 3.2 and later. +# +# This feature is not supported with smtp header/body +# checks. +# # PREPEND text... -# Prepend one line with the specified text, and +# Prepend one line with the specified text, and # inspect the next input line. # # Notes: # -# o The prepended text is output on a separate +# o The prepended text is output on a separate # line, immediately before the input that # triggered the PREPEND action. # # o The prepended text is not considered part of -# the input stream: it is not subject to +# the input stream: it is not subject to # header/body checks or address rewriting, and # it does not affect the way that Postfix adds # missing message headers. # # o When prepending text before a message header -# line, the prepended text must begin with a +# line, the prepended text must begin with a # valid message header label. # -# o This action cannot be used to prepend +# o This action cannot be used to prepend # multi-line text. # # This feature is available in Postfix 2.1 and later. @@ -326,14 +341,14 @@ # ter_header_checks. # # REDIRECT user@domain -# Write a message redirection request to the queue -# file, and inspect the next input line. After the +# Write a message redirection request to the queue +# file, and inspect the next input line. After the # message is queued, it will be sent to the specified # address instead of the intended recipient(s). # -# Note: this action overrides the FILTER action, and -# affects all recipients of the message. If multiple -# REDIRECT actions fire, only the last one is exe- +# Note: this action overrides the FILTER action, and +# affects all recipients of the message. If multiple +# REDIRECT actions fire, only the last one is exe- # cuted. # # This feature is available in Postfix 2.1 and later. @@ -342,34 +357,34 @@ # checks. # # REPLACE text... -# Replace the current line with the specified text, +# Replace the current line with the specified text, # and inspect the next input line. # # This feature is available in Postfix 2.2 and later. -# The description below applies to Postfix 2.2.2 and +# The description below applies to Postfix 2.2.2 and # later. # # Notes: # -# o When replacing a message header line, the -# replacement text must begin with a valid +# o When replacing a message header line, the +# replacement text must begin with a valid # header label. # -# o The replaced text remains part of the input -# stream. Unlike the result from the PREPEND -# action, a replaced message header may be -# subject to address rewriting and may affect -# the way that Postfix adds missing message +# o The replaced text remains part of the input +# stream. Unlike the result from the PREPEND +# action, a replaced message header may be +# subject to address rewriting and may affect +# the way that Postfix adds missing message # headers. # # REJECT optional text... -# Reject the entire message. Do not inspect the -# remainder of the input message. Reply with -# optional text... when the optional text is speci- +# Reject the entire message. Do not inspect the +# remainder of the input message. Reply with +# optional text... when the optional text is speci- # fied, otherwise reply with a generic error message. # -# Note: this action disables further header or -# body_checks inspection of the current message and +# Note: this action disables further header or +# body_checks inspection of the current message and # affects all recipients. # # Postfix version 2.3 and later support enhanced sta- @@ -380,39 +395,47 @@ # This feature is not supported with smtp header/body # checks. # +# STRIP optional text... +# Log a "strip:" record with the optional text... (or +# log a generic text), delete the input line from the +# input, and inspect the next input line. See IGNORE +# for a silent alternative. +# +# This feature is available in Postfix 3.2 and later. +# # WARN optional text... -# Log a "warning:" record with the optional text... +# Log a "warning:" record with the optional text... # (or log a generic text), and inspect the next input -# line. This action is useful for debugging and for -# testing a pattern before applying more drastic +# line. This action is useful for debugging and for +# testing a pattern before applying more drastic # actions. # # BUGS # Empty lines never match, because some map types mis-behave -# when given a zero-length search string. This limitation -# may be removed for regular expression tables in a future +# when given a zero-length search string. This limitation +# may be removed for regular expression tables in a future # release. # -# Many people overlook the main limitations of header and +# Many people overlook the main limitations of header and # body_checks rules. # -# o These rules operate on one logical message header +# o These rules operate on one logical message header # or one body line at a time. A decision made for one # line is not carried over to the next line. # -# o If text in the message body is encoded (RFC 2045) +# o If text in the message body is encoded (RFC 2045) # then the rules need to be specified for the encoded # form. # -# o Likewise, when message headers are encoded (RFC -# 2047) then the rules need to be specified for the +# o Likewise, when message headers are encoded (RFC +# 2047) then the rules need to be specified for the # encoded form. # -# Message headers added by the cleanup(8) daemon itself are +# Message headers added by the cleanup(8) daemon itself are # excluded from inspection. Examples of such message headers # are From:, To:, Message-ID:, Date:. # -# Message headers deleted by the cleanup(8) daemon will be +# Message headers deleted by the cleanup(8) daemon will be # examined before they are deleted. Examples are: Bcc:, Con- # tent-Length:, Return-Path:. # @@ -420,11 +443,11 @@ # 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 +# a time, in chunks of at most $line_length_limit # bytes. # # body_checks_size_limit -# The amount of content per message body segment +# The amount of content per message body segment # (attachment) that is subjected to $body_checks fil- # tering. # @@ -434,35 +457,35 @@ # # 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- +# 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 +# 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 +# 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 +# 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 +# Note: when used in this manner, body_checks will +# process a multi-line message header one line at a # time. # # EXAMPLES -# Header pattern to block attachments with bad file name -# extensions. For convenience, the PCRE /x flag is speci- -# fied, so that there is no need to collapse the pattern -# into a single line of text. The purpose of the +# Header pattern to block attachments with bad file name +# extensions. For convenience, the PCRE /x flag is speci- +# fied, so that there is no need to collapse the pattern +# into a single line of text. The purpose of the # [[:xdigit:]] sub-expressions is to recognize Windows CLSID # strings. # @@ -501,7 +524,7 @@ # RFC 2047, message header encoding for non-ASCII text # # 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 # CONTENT_INSPECTION_README, Postfix content inspection overview @@ -509,7 +532,7 @@ # BACKSCATTER_README, blocking returned forged mail # # 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/html/INSTALL.html b/postfix/html/INSTALL.html index e404714bf..975a5ae39 100644 --- a/postfix/html/INSTALL.html +++ b/postfix/html/INSTALL.html @@ -837,7 +837,9 @@ unreachable code. -DNO_IPV6 Do not build with IPv6 support. By default, IPv6 support is compiled in on platforms that are known to have IPv6 support. Note: this directive is for debugging -and testing only. It is not guaranteed to work on all platforms. +And testing only. It is not guaranteed to work on all platforms. +If you don't want IPv6 support, set "inet_protocols = ipv4" in +main.cf. -DNO_KQUEUE Do not build with FreeBSD diff --git a/postfix/html/MYSQL_README.html b/postfix/html/MYSQL_README.html index a01b3fe74..06a84aa3b 100644 --- a/postfix/html/MYSQL_README.html +++ b/postfix/html/MYSQL_README.html @@ -131,7 +131,8 @@ where_field = alias # Don't forget the leading "AND"! additional_conditions = AND status = 'paid' -# For Postfix 2.11 .. 3.1. This is the default as of Postfix 3.2. +# This is necessary to make UTF8 queries work for Postfix 2.11 .. 3.1, +# and is the default setting as of Postfix 3.2. option_group = client diff --git a/postfix/html/SMTPUTF8_README.html b/postfix/html/SMTPUTF8_README.html index a40cf36b5..0aef65887 100644 --- a/postfix/html/SMTPUTF8_README.html +++ b/postfix/html/SMTPUTF8_README.html @@ -104,6 +104,10 @@ parameter in main.cf:

+

(With Postfix ≤ 3.1, you may also need to specify "option_group += client" in Postfix MySQL client files, to enable UTF8 support +in MySQL queries. This setting is the default as of Postfix 3.2.)

+

With SMTPUTF8 support enabled, Postfix changes behavior with respect to earlier Postfix releases:

diff --git a/postfix/html/header_checks.5.html b/postfix/html/header_checks.5.html index dce6f7cc6..caf15b531 100644 --- a/postfix/html/header_checks.5.html +++ b/postfix/html/header_checks.5.html @@ -260,7 +260,7 @@ HEADER_CHECKS(5) HEADER_CHECKS(5) This feature is not supported with smtp header/body checks. IGNORE Delete the current line from the input, and inspect the next - input line. + input line. See STRIP for an alternative that logs the action. INFO optional text... Log an "info:" record with the optional text... (or log a @@ -269,22 +269,34 @@ HEADER_CHECKS(5) HEADER_CHECKS(5) This feature is available in Postfix 2.8 and later. + PASS optional text... + Log a "pass:" record with the optional text... (or log a generic + text), and turn off header, body, and Milter inspection for the + remainder of this message. + + Note: this feature relies on trust in information that is easy + to forge. + + This feature is available in Postfix 3.2 and later. + + This feature is not supported with smtp header/body checks. + PREPEND text... - Prepend one line with the specified text, and inspect the next + Prepend one line with the specified text, and inspect the next input line. Notes: - o The prepended text is output on a separate line, immedi- + o The prepended text is output on a separate line, immedi- ately before the input that triggered the PREPEND action. - o The prepended text is not considered part of the input - stream: it is not subject to header/body checks or - address rewriting, and it does not affect the way that + o The prepended text is not considered part of the input + stream: it is not subject to header/body checks or + address rewriting, and it does not affect the way that Postfix adds missing message headers. - o When prepending text before a message header line, the - prepended text must begin with a valid message header + o When prepending text before a message header line, the + prepended text must begin with a valid message header label. o This action cannot be used to prepend multi-line text. @@ -294,13 +306,13 @@ HEADER_CHECKS(5) HEADER_CHECKS(5) This feature is not supported with milter_header_checks. REDIRECT user@domain - Write a message redirection request to the queue file, and - inspect the next input line. After the message is queued, it - will be sent to the specified address instead of the intended + Write a message redirection request to the queue file, and + inspect the next input line. After the message is queued, it + will be sent to the specified address instead of the intended recipient(s). - Note: this action overrides the FILTER action, and affects all - recipients of the message. If multiple REDIRECT actions fire, + Note: this action overrides the FILTER action, and affects all + recipients of the message. If multiple REDIRECT actions fire, only the last one is executed. This feature is available in Postfix 2.1 and later. @@ -308,7 +320,7 @@ HEADER_CHECKS(5) HEADER_CHECKS(5) This feature is not supported with smtp header/body checks. REPLACE text... - Replace the current line with the specified text, and inspect + Replace the current line with the specified text, and inspect the next input line. This feature is available in Postfix 2.2 and later. The descrip- @@ -316,65 +328,72 @@ HEADER_CHECKS(5) HEADER_CHECKS(5) Notes: - o When replacing a message header line, the replacement + o When replacing a message header line, the replacement text must begin with a valid header label. - o The replaced text remains part of the input stream. - Unlike the result from the PREPEND action, a replaced - message header may be subject to address rewriting and - may affect the way that Postfix adds missing message + o The replaced text remains part of the input stream. + Unlike the result from the PREPEND action, a replaced + message header may be subject to address rewriting and + may affect the way that Postfix adds missing message headers. REJECT optional text... - Reject the entire message. Do not inspect the remainder of the - input message. Reply with optional text... when the optional + Reject the entire message. Do not inspect the remainder of the + input message. Reply with optional text... when the optional text is specified, otherwise reply with a generic error message. Note: this action disables further header or body_checks inspec- tion of the current message and affects all recipients. - Postfix version 2.3 and later support enhanced status codes. - When no code is specified at the beginning of optional text..., + Postfix version 2.3 and later support enhanced status codes. + When no code is specified at the beginning of optional text..., Postfix inserts a default enhanced status code of "5.7.1". This feature is not supported with smtp header/body checks. + STRIP optional text... + Log a "strip:" record with the optional text... (or log a + generic text), delete the input line from the input, and inspect + the next input line. See IGNORE for a silent alternative. + + This feature is available in Postfix 3.2 and later. + WARN optional text... - Log a "warning:" record with the optional text... (or log a - generic text), and inspect the next input line. This action is - useful for debugging and for testing a pattern before applying + Log a "warning:" record with the optional text... (or log a + generic text), and inspect the next input line. This action is + useful for debugging and for testing a pattern before applying more drastic actions. BUGS Empty lines never match, because some map types mis-behave when given a - zero-length search string. This limitation may be removed for regular + zero-length search string. This limitation may be removed for regular expression tables in a future release. - Many people overlook the main limitations of header and body_checks + Many people overlook the main limitations of header and body_checks rules. - o These rules operate on one logical message header or one body + o These rules operate on one logical message header or one body line at a time. A decision made for one line is not carried over to the next line. o If text in the message body is encoded (RFC 2045) then the rules need to be specified for the encoded form. - o Likewise, when message headers are encoded (RFC 2047) then the + o Likewise, when message headers are encoded (RFC 2047) then the rules need to be specified for the encoded form. Message headers added by the cleanup(8) daemon itself are excluded from - inspection. Examples of such message headers are From:, To:, Mes- + inspection. Examples of such message headers are From:, To:, Mes- sage-ID:, Date:. - Message headers deleted by the cleanup(8) daemon will be examined - before they are deleted. Examples are: Bcc:, Content-Length:, + Message headers deleted by the cleanup(8) daemon will be examined + before they are deleted. Examples are: Bcc:, Content-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 + 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 @@ -386,31 +405,31 @@ HEADER_CHECKS(5) HEADER_CHECKS(5) 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 any- - where in the message, and to the initial headers of attached + 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 any- + where in the message, and to the initial headers of attached messages. - Note: these filters see one logical message header at a time, + Note: these filters see one logical message header at a time, even when a message header spans multiple lines. Message headers - that are longer than $header_size_limit characters are trun- + that are longer than $header_size_limit characters are trun- cated. 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 + 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 + Note: when used in this manner, body_checks will process a multi-line message header one line at a time. EXAMPLES Header pattern to block attachments with bad file name extensions. For convenience, the PCRE /x flag is specified, so that there is no need to - collapse the pattern into a single line of text. The purpose of the + collapse the pattern into a single line of text. The purpose of the [[:xdigit:]] sub-expressions is to recognize Windows CLSID strings. /etc/postfix/main.cf: diff --git a/postfix/html/lmtp.8.html b/postfix/html/lmtp.8.html index cfd33171b..8536c8430 100644 --- a/postfix/html/lmtp.8.html +++ b/postfix/html/lmtp.8.html @@ -858,6 +858,11 @@ SMTP(8) SMTP(8) 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. + SEE ALSO generic(5), output address rewriting header_checks(5), message header content inspection diff --git a/postfix/html/mysql_table.5.html b/postfix/html/mysql_table.5.html index 802ead38f..094543e87 100644 --- a/postfix/html/mysql_table.5.html +++ b/postfix/html/mysql_table.5.html @@ -231,7 +231,7 @@ MYSQL_TABLE(5) MYSQL_TABLE(5) This parameter is available with Postfix 2.11 and later. - option_group (Postfix >=3.2: client; Postfix <=3.1: empty) + option_group (default: Postfix >=3.2: client, <= 3.1: empty) Read options from the given group of the mysql options file, after reading options from the [client] group. diff --git a/postfix/html/postconf.5.html b/postfix/html/postconf.5.html index 1134ae35f..166c8073f 100644 --- a/postfix/html/postconf.5.html +++ b/postfix/html/postconf.5.html @@ -5016,6 +5016,7 @@ parameter. See there for details.

The default TCP port that the Postfix LMTP client connects to. +Specify a symbolic name (see services(5)) or a numeric port.

@@ -11651,6 +11652,17 @@ during TLS startup and shutdown handshake procedures.

This feature is available in Postfix 2.2 and later.

+ + +
smtp_tcp_port +(default: smtp)
+ +

+The default TCP port that the Postfix SMTP client connects to. +Specify a symbolic name (see services(5)) or a numeric port. +

+ +
smtp_tls_CAfile diff --git a/postfix/html/smtp.8.html b/postfix/html/smtp.8.html index cfd33171b..8536c8430 100644 --- a/postfix/html/smtp.8.html +++ b/postfix/html/smtp.8.html @@ -858,6 +858,11 @@ SMTP(8) SMTP(8) 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. + SEE ALSO generic(5), output address rewriting header_checks(5), message header content inspection diff --git a/postfix/makedefs b/postfix/makedefs index de92bdb86..47fb8202f 100644 --- a/postfix/makedefs +++ b/postfix/makedefs @@ -66,7 +66,8 @@ # are known to have IPv6 support. # # Note: this directive is for debugging and testing only. It -# is not guaranteed to work on all platforms. +# is not guaranteed to work on all platforms. If you don't +# want IPv6 support, set "inet_protocols = ipv4" in main.cf. # .IP \fB-DNO_IP_CYRUS_SASL_AUTH\fR # Don't pass remote SMTP client and Postfix SMTP server IP # address and port information to the Cyrus SASL library. diff --git a/postfix/man/man5/header_checks.5 b/postfix/man/man5/header_checks.5 index 68b452ffa..31ac7dcaf 100644 --- a/postfix/man/man5/header_checks.5 +++ b/postfix/man/man5/header_checks.5 @@ -282,13 +282,25 @@ This feature is available in Postfix 2.0 and later. This feature is not supported with smtp header/body checks. .IP \fBIGNORE\fR Delete the current line from the input, and inspect -the next input line. +the next input line. See \fBSTRIP\fR for an alternative +that logs the action. .IP "\fBINFO \fIoptional text...\fR Log an "info:" record with the \fIoptional text...\fR (or log a generic text), and inspect the next input line. This action is useful for routine logging or for debugging. .sp This feature is available in Postfix 2.8 and later. +.IP "\fBPASS \fIoptional text...\fR" +Log a "pass:" record with the \fIoptional text...\fR (or +log a generic text), and turn off header, body, and Milter +inspection for the remainder of this message. +.sp +Note: this feature relies on trust in information that is +easy to forge. +.sp +This feature is available in Postfix 3.2 and later. +.sp +This feature is not supported with smtp header/body checks. .IP "\fBPREPEND \fItext...\fR" Prepend one line with the specified text, and inspect the next input line. @@ -359,6 +371,13 @@ text...\fR, Postfix inserts a default enhanced status code of "5.7.1". .sp This feature is not supported with smtp header/body checks. +.IP "\fBSTRIP \fIoptional text...\fR" +Log a "strip:" record with the \fIoptional text...\fR (or +log a generic text), delete the input line from the input, +and inspect the next input line. See \fBIGNORE\fR for a +silent alternative. +.sp +This feature is available in Postfix 3.2 and later. .IP "\fBWARN \fIoptional text...\fR Log a "warning:" record with the \fIoptional text...\fR (or log a generic text), and inspect the next input line. This diff --git a/postfix/man/man5/mysql_table.5 b/postfix/man/man5/mysql_table.5 index 2227e268a..1ef24d779 100644 --- a/postfix/man/man5/mysql_table.5 +++ b/postfix/man/man5/mysql_table.5 @@ -263,7 +263,7 @@ group, optionally followed by options from the group given with \fBoption_group\fR. .sp This parameter is available with Postfix 2.11 and later. -.IP "\fBoption_group (Postfix >=3.2: client; Postfix <=3.1: empty)\fR" +.IP "\fBoption_group (default: Postfix >=3.2: client, <= 3.1: empty)\fR" Read options from the given group of the mysql options file, after reading options from the \fB[client]\fR group. .sp diff --git a/postfix/man/man5/postconf.5 b/postfix/man/man5/postconf.5 index a22a09927..1cebf490d 100644 --- a/postfix/man/man5/postconf.5 +++ b/postfix/man/man5/postconf.5 @@ -2992,6 +2992,7 @@ parameter. See there for details. This feature is available in Postfix 2.3 and later. .SH lmtp_tcp_port (default: 24) The default TCP port that the Postfix LMTP client connects to. +Specify a symbolic name (see \fBservices\fR(5)) or a numeric port. .SH lmtp_tls_CAfile (default: empty) The LMTP\-specific version of the smtp_tls_CAfile configuration parameter. See there for details. @@ -7308,6 +7309,9 @@ Time limit for Postfix SMTP client write and read operations during TLS startup and shutdown handshake procedures. .PP This feature is available in Postfix 2.2 and later. +.SH smtp_tcp_port (default: smtp) +The default TCP port that the Postfix SMTP client connects to. +Specify a symbolic name (see \fBservices\fR(5)) or a numeric port. .SH smtp_tls_CAfile (default: empty) A file containing CA certificates of root CAs trusted to sign either remote SMTP server certificates or intermediate CA certificates. diff --git a/postfix/man/man8/smtp.8 b/postfix/man/man8/smtp.8 index 7d61f80e9..306620548 100644 --- a/postfix/man/man8/smtp.8 +++ b/postfix/man/man8/smtp.8 @@ -745,6 +745,10 @@ Available with Postfix 3.1 and later: .IP "\fBlmtp_fallback_relay (empty)\fR" Optional list of relay hosts for LMTP destinations that can't be found or that are unreachable. +.PP +Available with Postfix 3.2 and later: +.IP "\fBsmtp_tcp_port (smtp)\fR" +The default TCP port that the Postfix SMTP client connects to. .SH "SEE ALSO" .na .nf diff --git a/postfix/mantools/postlink b/postfix/mantools/postlink index 0e4eb9c22..2bb97ccf9 100755 --- a/postfix/mantools/postlink +++ b/postfix/mantools/postlink @@ -517,6 +517,7 @@ while (<>) { s;\bsmtp_skip_4xx_greeting\b;$&;g; s;\bsmtp_skip_5xx_greeting\b;$&;g; s;\bsmtp_skip_quit_response\b;$&;g; + s;\bsmtp_tcp_port\b;$&;g; s;\bsmtp_xforward_timeout\b;$&;g; s;\bsmtpd_log_access_permit_actions\b;$&;g; s;\bsmtpd_autho[-]*\n*[ ]*rized_verp_clients\b;$&;g; diff --git a/postfix/proto/INSTALL.html b/postfix/proto/INSTALL.html index ff17d4185..7d3009205 100644 --- a/postfix/proto/INSTALL.html +++ b/postfix/proto/INSTALL.html @@ -837,7 +837,9 @@ unreachable code. -DNO_IPV6 Do not build with IPv6 support. By default, IPv6 support is compiled in on platforms that are known to have IPv6 support. Note: this directive is for debugging -and testing only. It is not guaranteed to work on all platforms. +And testing only. It is not guaranteed to work on all platforms. +If you don't want IPv6 support, set "inet_protocols = ipv4" in +main.cf. -DNO_KQUEUE Do not build with FreeBSD diff --git a/postfix/proto/MYSQL_README.html b/postfix/proto/MYSQL_README.html index 78290b24a..3b37a0062 100644 --- a/postfix/proto/MYSQL_README.html +++ b/postfix/proto/MYSQL_README.html @@ -131,7 +131,8 @@ where_field = alias # Don't forget the leading "AND"! additional_conditions = AND status = 'paid' -# For Postfix 2.11 .. 3.1. This is the default as of Postfix 3.2. +# This is necessary to make UTF8 queries work for Postfix 2.11 .. 3.1, +# and is the default setting as of Postfix 3.2. option_group = client diff --git a/postfix/proto/SMTPUTF8_README.html b/postfix/proto/SMTPUTF8_README.html index 9f6e1c042..34a51c7d9 100644 --- a/postfix/proto/SMTPUTF8_README.html +++ b/postfix/proto/SMTPUTF8_README.html @@ -104,6 +104,10 @@ parameter in main.cf:

+

(With Postfix ≤ 3.1, you may also need to specify "option_group += client" in Postfix MySQL client files, to enable UTF8 support +in MySQL queries. This setting is the default as of Postfix 3.2.)

+

With SMTPUTF8 support enabled, Postfix changes behavior with respect to earlier Postfix releases:

diff --git a/postfix/proto/header_checks b/postfix/proto/header_checks index e78ea0815..1aa6f5a71 100644 --- a/postfix/proto/header_checks +++ b/postfix/proto/header_checks @@ -287,13 +287,25 @@ # This feature is not supported with smtp header/body checks. # .IP \fBIGNORE\fR # Delete the current line from the input, and inspect -# the next input line. +# the next input line. See \fBSTRIP\fR for an alternative +# that logs the action. # .IP "\fBINFO \fIoptional text...\fR # Log an "info:" record with the \fIoptional text...\fR (or # log a generic text), and inspect the next input line. This # action is useful for routine logging or for debugging. # .sp # This feature is available in Postfix 2.8 and later. +# .IP "\fBPASS \fIoptional text...\fR" +# Log a "pass:" record with the \fIoptional text...\fR (or +# log a generic text), and turn off header, body, and Milter +# inspection for the remainder of this message. +# .sp +# Note: this feature relies on trust in information that is +# easy to forge. +# .sp +# This feature is available in Postfix 3.2 and later. +# .sp +# This feature is not supported with smtp header/body checks. # .IP "\fBPREPEND \fItext...\fR" # Prepend one line with the specified text, and inspect the next # input line. @@ -364,6 +376,13 @@ # "5.7.1". # .sp # This feature is not supported with smtp header/body checks. +# .IP "\fBSTRIP \fIoptional text...\fR" +# Log a "strip:" record with the \fIoptional text...\fR (or +# log a generic text), delete the input line from the input, +# and inspect the next input line. See \fBIGNORE\fR for a +# silent alternative. +# .sp +# This feature is available in Postfix 3.2 and later. # .IP "\fBWARN \fIoptional text...\fR # Log a "warning:" record with the \fIoptional text...\fR (or # log a generic text), and inspect the next input line. This diff --git a/postfix/proto/mysql_table b/postfix/proto/mysql_table index 9e0e7e472..cc51b0cb3 100644 --- a/postfix/proto/mysql_table +++ b/postfix/proto/mysql_table @@ -251,7 +251,7 @@ # with \fBoption_group\fR. # .sp # This parameter is available with Postfix 2.11 and later. -# .IP "\fBoption_group (Postfix >=3.2: client; Postfix <=3.1: empty)\fR" +# .IP "\fBoption_group (default: Postfix >=3.2: client, <= 3.1: empty)\fR" # Read options from the given group of the mysql options file, # after reading options from the \fB[client]\fR group. # .sp diff --git a/postfix/proto/postconf.proto b/postfix/proto/postconf.proto index eb62ab0ea..8bc5e6d36 100644 --- a/postfix/proto/postconf.proto +++ b/postfix/proto/postconf.proto @@ -7858,6 +7858,14 @@ lmtp_sasl_security_options = noplaintext

The default TCP port that the Postfix LMTP client connects to. +Specify a symbolic name (see services(5)) or a numeric port. +

+ +%PARAM smtp_tcp_port smtp + +

+The default TCP port that the Postfix SMTP client connects to. +Specify a symbolic name (see services(5)) or a numeric port.

%PARAM mail_release_date see "postconf -d" output diff --git a/postfix/src/cleanup/cleanup_message.c b/postfix/src/cleanup/cleanup_message.c index b945cdc11..b468ac0db 100644 --- a/postfix/src/cleanup/cleanup_message.c +++ b/postfix/src/cleanup/cleanup_message.c @@ -345,6 +345,11 @@ static const char *cleanup_act(CLEANUP_STATE *state, char *context, } return (buf); } + if (STREQUAL(value, "PASS", command_len)) { + cleanup_act_log(state, "pass", context, buf, optional_text); + state->flags &= ~CLEANUP_FLAG_FILTER_ALL; + return (buf); + } if (STREQUAL(value, "DISCARD", command_len)) { cleanup_act_log(state, "discard", context, buf, optional_text); state->flags |= CLEANUP_FLAG_DISCARD; @@ -453,6 +458,10 @@ static const char *cleanup_act(CLEANUP_STATE *state, char *context, } return (buf); } + if (STREQUAL(value, "STRIP", command_len)) { + cleanup_act_log(state, "strip", context, buf, optional_text); + return (CLEANUP_ACT_DROP); + } /* Allow and ignore optional text after the action. */ if (STREQUAL(value, "IGNORE", command_len)) diff --git a/postfix/src/global/Makefile.in b/postfix/src/global/Makefile.in index 793b3da77..9cf134e31 100644 --- a/postfix/src/global/Makefile.in +++ b/postfix/src/global/Makefile.in @@ -388,7 +388,8 @@ mime_tests: mime_test mime_nest mime_8bit mime_dom mime_trunc mime_cvt \ header_body_checks_tests: header_body_checks_null_test \ header_body_checks_warn_test header_body_checks_prepend_test \ - header_body_checks_ignore_test header_body_checks_replace_test + header_body_checks_ignore_test header_body_checks_replace_test \ + header_body_checks_strip_test root_tests: rewrite_clnt_test resolve_clnt_test verify_sender_addr_test @@ -641,6 +642,17 @@ header_body_checks_replace_test: header_body_checks header_body_checks_replace.r cmp header_body_checks_replace.ref header_body_checks_replace.tmp rm -f header_body_checks_replace.tmp header_body_checks_head header_body_checks_mime header_body_checks_nest header_body_checks_body +header_body_checks_strip_test: header_body_checks header_body_checks_strip.ref + echo /./ strip header line >header_body_checks_head + echo /./ strip mime header line >header_body_checks_mime + echo /./ strip nested header >header_body_checks_nest + echo /./ strip body line >header_body_checks_body + $(SHLIB_ENV) ./header_body_checks regexp:header_body_checks_head regexp:header_body_checks_mime \ + regexp:header_body_checks_nest regexp:header_body_checks_body \ + header_body_checks_strip.tmp 2>&1 + cmp header_body_checks_strip.ref header_body_checks_strip.tmp + rm -f header_body_checks_strip.tmp header_body_checks_head header_body_checks_mime header_body_checks_nest header_body_checks_body + mail_parm_split_test: mail_parm_split mail_parm_split.in mail_parm_split.ref $(SHLIB_ENV) ./mail_parm_split mail_parm_split.tmp 2>&1 diff mail_parm_split.ref mail_parm_split.tmp diff --git a/postfix/src/global/header_body_checks.c b/postfix/src/global/header_body_checks.c index f1e6469af..e2fc49989 100644 --- a/postfix/src/global/header_body_checks.c +++ b/postfix/src/global/header_body_checks.c @@ -281,12 +281,16 @@ static char *hbc_action(void *context, HBC_CALL_BACKS *cb, } return ((char *) line); } + if (STREQUAL(cmd, "STRIP", cmd_len)) { + cb->logger(context, "strip", where, line, cmd_args); + return (HBC_CHECKS_STAT_IGNORE); + } /* Allow and ignore optional text after the action. */ if (STREQUAL(cmd, "IGNORE", cmd_len)) /* XXX Not logged for compatibility with cleanup(8). */ return (HBC_CHECKS_STAT_IGNORE); - + if (STREQUAL(cmd, "DUNNO", cmd_len) /* preferred */ ||STREQUAL(cmd, "OK", cmd_len)) /* compatibility */ return ((char *) line); diff --git a/postfix/src/global/header_body_checks_strip.ref b/postfix/src/global/header_body_checks_strip.ref new file mode 100644 index 000000000..1e0207508 --- /dev/null +++ b/postfix/src/global/header_body_checks_strip.ref @@ -0,0 +1,41 @@ +header_body_checks: test-queueID: strip: header subject: primary subject: header line +header_body_checks: test-queueID: strip: header content-type: multipart/(co\m\)ment)mumble mumble; boundary = "ab\cd ? ef" mumble: mime header line +HEADER END +2 BODY N 0 | +header_body_checks: test-queueID: strip: body abcdef prolog: body line +4 BODY N 15 | +header_body_checks: test-queueID: strip: body --abcd ef: body line +header_body_checks: test-queueID: strip: header content-type: message/rfc822; mumble: mime header line +7 BODY N 0 | +header_body_checks: test-queueID: strip: header subject: nested subject: nested header +header_body_checks: test-queueID: strip: header content-type: multipart/mumble; boundary(comment)="pqrs": mime header line +header_body_checks: test-queueID: strip: header content-transfer-encoding: base64: mime header line +header_body_checks: warning: invalid message/* or multipart/* encoding domain: base64 +11 BODY N 0 | +header_body_checks: test-queueID: strip: body pqrs prolog: body line +13 BODY N 13 | +header_body_checks: test-queueID: strip: body --pqrs: body line +header_body_checks: test-queueID: strip: header header: pqrs part 01: mime header line +16 BODY N 0 | +header_body_checks: test-queueID: strip: body body pqrs part 01: body line +18 BODY N 19 | +header_body_checks: test-queueID: strip: body --pqrs: body line +header_body_checks: test-queueID: strip: header header: pqrs part 02: mime header line +21 BODY N 0 | +header_body_checks: test-queueID: strip: body body pqrs part 02: body line +23 BODY N 19 | +header_body_checks: test-queueID: strip: body --bogus-boundary: body line +header_body_checks: test-queueID: strip: body header: wietse: body line +26 BODY N 52 | +header_body_checks: test-queueID: strip: body body asdasads: body line +28 BODY N 67 | +header_body_checks: test-queueID: strip: body --abcd ef: body line +header_body_checks: test-queueID: strip: header header: abcdef part 02: mime header line +31 BODY N 0 | +header_body_checks: test-queueID: strip: body body abcdef part 02: body line +33 BODY N 21 | +header_body_checks: test-queueID: strip: body --abcd ef--: body line +35 BODY N 12 | +header_body_checks: test-queueID: strip: body epilog: body line +BODY END +header_body_checks: warning: improper message/* or multipart/* encoding domain diff --git a/postfix/src/global/mail_params.h b/postfix/src/global/mail_params.h index 3b2db0ac2..b4b51eb6d 100644 --- a/postfix/src/global/mail_params.h +++ b/postfix/src/global/mail_params.h @@ -1796,6 +1796,10 @@ extern char *var_smtp_sasl_auth_cache_name; #define DEF_LMTP_SASL_AUTH_CACHE_TIME "90d" extern int var_smtp_sasl_auth_cache_time; +#define VAR_SMTP_TCP_PORT "smtp_tcp_port" +#define DEF_SMTP_TCP_PORT "smtp" +extern char *var_smtp_tcp_port; + /* * LMTP client. Timeouts inspired by RFC 1123. The LMTP recipient limit * determines how many recipient addresses the LMTP client sends along with diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 7369da5fd..03afe4a55 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 "20160925" +#define MAIL_RELEASE_DATE "20161008" #define MAIL_VERSION_NUMBER "3.2" #ifdef SNAPSHOT diff --git a/postfix/src/smtp/lmtp_params.c b/postfix/src/smtp/lmtp_params.c index 39f5e1368..732d55434 100644 --- a/postfix/src/smtp/lmtp_params.c +++ b/postfix/src/smtp/lmtp_params.c @@ -47,7 +47,7 @@ VAR_LMTP_TLS_POLICY, DEF_LMTP_TLS_POLICY, &var_smtp_tls_policy, 0, 0, VAR_PROP_EXTENSION, DEF_PROP_EXTENSION, &var_prop_extension, 0, 0, VAR_LMTP_GENERIC_MAPS, DEF_LMTP_GENERIC_MAPS, &var_smtp_generic_maps, 0, 0, - VAR_LMTP_TCP_PORT, DEF_LMTP_TCP_PORT, &var_lmtp_tcp_port, 0, 0, + VAR_LMTP_TCP_PORT, DEF_LMTP_TCP_PORT, &var_smtp_tcp_port, 0, 0, VAR_LMTP_PIX_BUG_WORDS, DEF_LMTP_PIX_BUG_WORDS, &var_smtp_pix_bug_words, 0, 0, VAR_LMTP_PIX_BUG_MAPS, DEF_LMTP_PIX_BUG_MAPS, &var_smtp_pix_bug_maps, 0, 0, VAR_LMTP_SASL_AUTH_CACHE_NAME, DEF_LMTP_SASL_AUTH_CACHE_NAME, &var_smtp_sasl_auth_cache_name, 0, 0, diff --git a/postfix/src/smtp/smtp.c b/postfix/src/smtp/smtp.c index 93a033e33..b46d1e483 100644 --- a/postfix/src/smtp/smtp.c +++ b/postfix/src/smtp/smtp.c @@ -705,6 +705,10 @@ /* .IP "\fBlmtp_fallback_relay (empty)\fR" /* Optional list of relay hosts for LMTP destinations that can't be /* found or that are unreachable. +/* .PP +/* Available with Postfix 3.2 and later: +/* .IP "\fBsmtp_tcp_port (smtp)\fR" +/* The default TCP port that the Postfix SMTP client connects to. /* SEE ALSO /* generic(5), output address rewriting /* header_checks(5), message header content inspection @@ -908,7 +912,7 @@ char *var_smtp_tls_insecure_mx_policy; char *var_smtp_generic_maps; char *var_prop_extension; bool var_smtp_sender_auth; -char *var_lmtp_tcp_port; +char *var_smtp_tcp_port; int var_scache_proto_tmout; bool var_smtp_cname_overr; char *var_smtp_pix_bug_words; diff --git a/postfix/src/smtp/smtp_connect.c b/postfix/src/smtp/smtp_connect.c index 1f5b1c1a3..7eb0462cf 100644 --- a/postfix/src/smtp/smtp_connect.c +++ b/postfix/src/smtp/smtp_connect.c @@ -1140,8 +1140,6 @@ int smtp_connect(SMTP_STATE *state) * destination to address list, and whether to stop before we reach the * end of that list. */ -#define DEF_LMTP_SERVICE var_lmtp_tcp_port -#define DEF_SMTP_SERVICE "smtp" /* * With LMTP we have direct-to-host delivery only. The destination may @@ -1153,7 +1151,7 @@ int smtp_connect(SMTP_STATE *state) } else { if (strncmp(destination, "inet:", 5) == 0) destination += 5; - smtp_connect_inet(state, destination, DEF_LMTP_SERVICE); + smtp_connect_inet(state, destination, var_smtp_tcp_port); } } @@ -1163,7 +1161,7 @@ int smtp_connect(SMTP_STATE *state) * Postfix configurations that have a host with such a name. */ else { - smtp_connect_inet(state, destination, DEF_SMTP_SERVICE); + smtp_connect_inet(state, destination, var_smtp_tcp_port); } /* diff --git a/postfix/src/smtp/smtp_params.c b/postfix/src/smtp/smtp_params.c index 34f83e80a..d8628831d 100644 --- a/postfix/src/smtp/smtp_params.c +++ b/postfix/src/smtp/smtp_params.c @@ -48,7 +48,7 @@ VAR_SMTP_TLS_POLICY, DEF_SMTP_TLS_POLICY, &var_smtp_tls_policy, 0, 0, VAR_PROP_EXTENSION, DEF_PROP_EXTENSION, &var_prop_extension, 0, 0, VAR_SMTP_GENERIC_MAPS, DEF_SMTP_GENERIC_MAPS, &var_smtp_generic_maps, 0, 0, - VAR_LMTP_TCP_PORT, DEF_LMTP_TCP_PORT, &var_lmtp_tcp_port, 0, 0, + VAR_SMTP_TCP_PORT, DEF_SMTP_TCP_PORT, &var_smtp_tcp_port, 0, 0, VAR_SMTP_PIX_BUG_WORDS, DEF_SMTP_PIX_BUG_WORDS, &var_smtp_pix_bug_words, 0, 0, VAR_SMTP_PIX_BUG_MAPS, DEF_SMTP_PIX_BUG_MAPS, &var_smtp_pix_bug_maps, 0, 0, VAR_SMTP_SASL_AUTH_CACHE_NAME, DEF_SMTP_SASL_AUTH_CACHE_NAME, &var_smtp_sasl_auth_cache_name, 0, 0, diff --git a/postfix/src/util/sys_compat.c b/postfix/src/util/sys_compat.c index 6f3469ac7..04e3cfdf3 100644 --- a/postfix/src/util/sys_compat.c +++ b/postfix/src/util/sys_compat.c @@ -40,7 +40,7 @@ /* int af; /* const void *src; /* char *dst; -/* size_t size; +/* SOCKADDR_SIZE size; /* /* int inet_pton(af, src, dst) /* int af; @@ -293,7 +293,7 @@ int closefrom(int lowfd) /* inet_ntop - convert binary address to printable address */ -const char *inet_ntop(int af, const void *src, char *dst, size_t size) +const char *inet_ntop(int af, const void *src, char *dst, SOCKADDR_SIZE size) { const unsigned char *addr; char buffer[sizeof("255.255.255.255")]; diff --git a/postfix/src/util/sys_defs.h b/postfix/src/util/sys_defs.h index e3b4f8a59..e01b45ecd 100644 --- a/postfix/src/util/sys_defs.h +++ b/postfix/src/util/sys_defs.h @@ -1339,10 +1339,11 @@ extern int dup2_pass_on_exec(int oldd, int newd); * Defaults for systems that pre-date IPv6 support. */ #ifndef HAS_IPV6 +#include #define EMULATE_IPV4_ADDRINFO #define MISSING_INET_PTON #define MISSING_INET_NTOP -extern const char *inet_ntop(int, const void *, char *, size_t); +extern const char *inet_ntop(int, const void *, char *, SOCKADDR_SIZE); extern int inet_pton(int, const char *, void *); #endif