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.
||_____________________________|______________________________________________|
|| |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 |
|_\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
|| |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. |
|_\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
|| |Do not build with FreeBSD / NetBSD / OpenBSD /|
||-DNO_KQUEUE |MacOSX KQUEUE support. By default, KQUEUE |
# 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
A\bAd\bdd\bdi\bit\bti\bio\bon\bna\bal\bl n\bno\bot\bte\bes\bs
# p\bpo\bos\bst\btc\bco\bon\bnf\bf "\b"s\bsm\bmt\btp\bpu\but\btf\bf8\b8_\b_e\ben\bna\bab\bbl\ble\be =\b= y\bye\bes\bs"\b"
# p\bpo\bos\bst\btf\bfi\bix\bx r\bre\bel\blo\boa\bad\bd
+(With Postfix <= 3.1, you may also need to specify "o\bop\bpt\bti\bio\bon\bn_\b_g\bgr\bro\bou\bup\bp =\b= c\bcl\bli\bie\ben\bnt\bt" 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:
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.
# 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.
# 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.
# 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-
# 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:.
#
# 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.
#
#
# 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.
#
# 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
# 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)
<tr> <td> </td> <td> -DNO_IPV6 </td> <td> 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 "<a href="postconf.5.html#inet_protocols">inet_protocols</a> = ipv4" in
+<a href="postconf.5.html">main.cf</a>.
</td> </tr>
<tr> <td> </td> <td> -DNO_KQUEUE </td> <td> Do not build with FreeBSD
# 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
</pre>
</pre>
</blockquote>
+<p> (With Postfix ≤ 3.1, you may also need to specify "<b>option_group
+= client</b>" in Postfix MySQL client files, to enable UTF8 support
+in MySQL queries. This setting is the default as of Postfix 3.2.) </p>
+
<p> With SMTPUTF8 support enabled, Postfix changes behavior with
respect to earlier Postfix releases: </p>
This feature is not supported with smtp header/body checks.
<b>IGNORE</b> Delete the current line from the input, and inspect the next
- input line.
+ input line. See <b>STRIP</b> for an alternative that logs the action.
<b>INFO</b> <i>optional text...</i>
Log an "info:" record with the <i>optional text...</i> (or log a
This feature is available in Postfix 2.8 and later.
+ <b>PASS</b> <i>optional text...</i>
+ Log a "pass:" record with the <i>optional text...</i> (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.
+
<b>PREPEND</b> <i>text...</i>
- 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:
- <b>o</b> The prepended text is output on a separate line, immedi-
+ <b>o</b> The prepended text is output on a separate line, immedi-
ately before the input that triggered the <b>PREPEND</b> action.
- <b>o</b> 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
+ <b>o</b> 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.
- <b>o</b> When prepending text before a message header line, the
- prepended text must begin with a valid message header
+ <b>o</b> When prepending text before a message header line, the
+ prepended text must begin with a valid message header
label.
<b>o</b> This action cannot be used to prepend multi-line text.
This feature is not supported with <a href="postconf.5.html#milter_header_checks">milter_header_checks</a>.
<b>REDIRECT</b> <i>user@domain</i>
- 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 <b>FILTER</b> action, and affects all
- recipients of the message. If multiple <b>REDIRECT</b> actions fire,
+ Note: this action overrides the <b>FILTER</b> action, and affects all
+ recipients of the message. If multiple <b>REDIRECT</b> actions fire,
only the last one is executed.
This feature is available in Postfix 2.1 and later.
This feature is not supported with smtp header/body checks.
<b>REPLACE</b> <i>text...</i>
- 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-
Notes:
- <b>o</b> When replacing a message header line, the replacement
+ <b>o</b> When replacing a message header line, the replacement
text must begin with a valid header label.
- <b>o</b> The replaced text remains part of the input stream.
- Unlike the result from the <b>PREPEND</b> action, a replaced
- message header may be subject to address rewriting and
- may affect the way that Postfix adds missing message
+ <b>o</b> The replaced text remains part of the input stream.
+ Unlike the result from the <b>PREPEND</b> action, a replaced
+ message header may be subject to address rewriting and
+ may affect the way that Postfix adds missing message
headers.
<b>REJECT</b> <i>optional text...</i>
- Reject the entire message. Do not inspect the remainder of the
- input message. Reply with <i>optional text...</i> when the optional
+ Reject the entire message. Do not inspect the remainder of the
+ input message. Reply with <i>optional text...</i> when the optional
text is specified, otherwise reply with a generic error message.
Note: this action disables further header or <a href="postconf.5.html#body_checks">body_checks</a> 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 <i>optional text...</i>,
+ Postfix version 2.3 and later support enhanced status codes.
+ When no code is specified at the beginning of <i>optional text...</i>,
Postfix inserts a default enhanced status code of "5.7.1".
This feature is not supported with smtp header/body checks.
+ <b>STRIP</b> <i>optional text...</i>
+ Log a "strip:" record with the <i>optional text...</i> (or log a
+ generic text), delete the input line from the input, and inspect
+ the next input line. See <b>IGNORE</b> for a silent alternative.
+
+ This feature is available in Postfix 3.2 and later.
+
<b>WARN</b> <i>optional text...</i>
- Log a "warning:" record with the <i>optional text...</i> (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 <i>optional text...</i> (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.
<b>BUGS</b>
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 <a href="postconf.5.html#body_checks">body_checks</a>
+ Many people overlook the main limitations of header and <a href="postconf.5.html#body_checks">body_checks</a>
rules.
- <b>o</b> These rules operate on one logical message header or one body
+ <b>o</b> 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.
<b>o</b> If text in the message body is encoded (<a href="http://tools.ietf.org/html/rfc2045">RFC 2045</a>) then the rules
need to be specified for the encoded form.
- <b>o</b> Likewise, when message headers are encoded (<a href="http://tools.ietf.org/html/rfc2047">RFC 2047</a>) then the
+ <b>o</b> Likewise, when message headers are encoded (<a href="http://tools.ietf.org/html/rfc2047">RFC 2047</a>) then the
rules need to be specified for the encoded form.
Message headers added by the <a href="cleanup.8.html"><b>cleanup</b>(8)</a> daemon itself are excluded from
- inspection. Examples of such message headers are <b>From:</b>, <b>To:</b>, <b>Mes-</b>
+ inspection. Examples of such message headers are <b>From:</b>, <b>To:</b>, <b>Mes-</b>
<b>sage-ID:</b>, <b>Date:</b>.
- Message headers deleted by the <a href="cleanup.8.html"><b>cleanup</b>(8)</a> daemon will be examined
- before they are deleted. Examples are: <b>Bcc:</b>, <b>Content-Length:</b>,
+ Message headers deleted by the <a href="cleanup.8.html"><b>cleanup</b>(8)</a> daemon will be examined
+ before they are deleted. Examples are: <b>Bcc:</b>, <b>Content-Length:</b>,
<b>Return-Path:</b>.
<b>CONFIGURATION PARAMETERS</b>
<b><a href="postconf.5.html#body_checks">body_checks</a></b>
- 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 <b>$<a href="postconf.5.html#line_length_limit">line_length_limit</a></b> bytes.
<b><a href="postconf.5.html#body_checks_size_limit">body_checks_size_limit</a></b>
<b><a href="postconf.5.html#mime_header_checks">mime_header_checks</a></b> (default: <b>$<a href="postconf.5.html#header_checks">header_checks</a></b>)
<b><a href="postconf.5.html#nested_header_checks">nested_header_checks</a></b> (default: <b>$<a href="postconf.5.html#header_checks">header_checks</a></b>)
- 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 <b>$<a href="postconf.5.html#header_size_limit">header_size_limit</a></b> characters are trun-
+ that are longer than <b>$<a href="postconf.5.html#header_size_limit">header_size_limit</a></b> characters are trun-
cated.
<b><a href="postconf.5.html#disable_mime_input_processing">disable_mime_input_processing</a></b>
- 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
<b><a href="postconf.5.html#header_checks">header_checks</a></b> is applied to all the initial message headers, and
that <b><a href="postconf.5.html#body_checks">body_checks</a></b> is applied to the remainder of the message.
- Note: when used in this manner, <b><a href="postconf.5.html#body_checks">body_checks</a></b> will process a
+ Note: when used in this manner, <b><a href="postconf.5.html#body_checks">body_checks</a></b> will process a
multi-line message header one line at a time.
<b>EXAMPLES</b>
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/<a href="postconf.5.html">main.cf</a>:
Optional list of relay hosts for LMTP destinations that can't be
found or that are unreachable.
+ Available with Postfix 3.2 and later:
+
+ <b><a href="postconf.5.html#smtp_tcp_port">smtp_tcp_port</a> (smtp)</b>
+ The default TCP port that the Postfix SMTP client connects to.
+
<b>SEE ALSO</b>
<a href="generic.5.html">generic(5)</a>, output address rewriting
<a href="header_checks.5.html">header_checks(5)</a>, message header content inspection
This parameter is available with Postfix 2.11 and later.
- <b>option_group (Postfix</b> ><b>=3.2: client; Postfix</b> <<b>=3.1: empty)</b>
+ <b>option_group (default: Postfix</b> ><b>=3.2: client,</b> <<b>= 3.1: empty)</b>
Read options from the given group of the mysql options file,
after reading options from the <b>[client]</b> group.
<p>
The default TCP port that the Postfix LMTP client connects to.
+Specify a symbolic name (see services(5)) or a numeric port.
</p>
<p> This feature is available in Postfix 2.2 and later. </p>
+</DD>
+
+<DT><b><a name="smtp_tcp_port">smtp_tcp_port</a>
+(default: smtp)</b></DT><DD>
+
+<p>
+The default TCP port that the Postfix SMTP client connects to.
+Specify a symbolic name (see services(5)) or a numeric port.
+</p>
+
+
</DD>
<DT><b><a name="smtp_tls_CAfile">smtp_tls_CAfile</a>
Optional list of relay hosts for LMTP destinations that can't be
found or that are unreachable.
+ Available with Postfix 3.2 and later:
+
+ <b><a href="postconf.5.html#smtp_tcp_port">smtp_tcp_port</a> (smtp)</b>
+ The default TCP port that the Postfix SMTP client connects to.
+
<b>SEE ALSO</b>
<a href="generic.5.html">generic(5)</a>, output address rewriting
<a href="header_checks.5.html">header_checks(5)</a>, message header content inspection
# 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.
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.
"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
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
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.
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.
.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
s;\bsmtp_skip_4xx_greeting\b;<a href="postconf.5.html#smtp_skip_4xx_greeting">$&</a>;g;
s;\bsmtp_skip_5xx_greeting\b;<a href="postconf.5.html#smtp_skip_5xx_greeting">$&</a>;g;
s;\bsmtp_skip_quit_response\b;<a href="postconf.5.html#smtp_skip_quit_response">$&</a>;g;
+ s;\bsmtp_tcp_port\b;<a href="postconf.5.html#smtp_tcp_port">$&</a>;g;
s;\bsmtp_xforward_timeout\b;<a href="postconf.5.html#smtp_xforward_timeout">$&</a>;g;
s;\bsmtpd_log_access_permit_actions\b;<a href="postconf.5.html#smtpd_log_access_permit_actions">$&</a>;g;
s;\bsmtpd_autho[-</bB>]*\n*[ <bB>]*rized_verp_clients\b;<a href="postconf.5.html#smtpd_authorized_verp_clients">$&</a>;g;
<tr> <td> </td> <td> -DNO_IPV6 </td> <td> 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.
</td> </tr>
<tr> <td> </td> <td> -DNO_KQUEUE </td> <td> Do not build with FreeBSD
# 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
</pre>
</pre>
</blockquote>
+<p> (With Postfix ≤ 3.1, you may also need to specify "<b>option_group
+= client</b>" in Postfix MySQL client files, to enable UTF8 support
+in MySQL queries. This setting is the default as of Postfix 3.2.) </p>
+
<p> With SMTPUTF8 support enabled, Postfix changes behavior with
respect to earlier Postfix releases: </p>
# 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.
# "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
# 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
<p>
The default TCP port that the Postfix LMTP client connects to.
+Specify a symbolic name (see services(5)) or a numeric port.
+</p>
+
+%PARAM smtp_tcp_port smtp
+
+<p>
+The default TCP port that the Postfix SMTP client connects to.
+Specify a symbolic name (see services(5)) or a numeric port.
</p>
%PARAM mail_release_date see "postconf -d" output
}
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;
}
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))
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
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 \
+ <mime_test.in >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.in >mail_parm_split.tmp 2>&1
diff mail_parm_split.ref mail_parm_split.tmp
}
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);
--- /dev/null
+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
#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
* 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
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,
/* .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
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;
* 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
} 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);
}
}
* 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);
}
/*
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,
/* int af;
/* const void *src;
/* char *dst;
-/* size_t size;
+/* SOCKADDR_SIZE size;
/*
/* int inet_pton(af, src, dst)
/* int af;
/* 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")];
* Defaults for systems that pre-date IPv6 support.
*/
#ifndef HAS_IPV6
+#include <sys/socket.h>
#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