]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.2-20161008
authorWietse Venema <wietse@porcupine.org>
Sat, 8 Oct 2016 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sat, 29 Oct 2016 23:00:10 +0000 (19:00 -0400)
39 files changed:
postfix/HISTORY
postfix/INSTALL
postfix/README_FILES/INSTALL
postfix/README_FILES/MYSQL_README
postfix/README_FILES/SMTPUTF8_README
postfix/WISHLIST
postfix/conf/header_checks
postfix/html/INSTALL.html
postfix/html/MYSQL_README.html
postfix/html/SMTPUTF8_README.html
postfix/html/header_checks.5.html
postfix/html/lmtp.8.html
postfix/html/mysql_table.5.html
postfix/html/postconf.5.html
postfix/html/smtp.8.html
postfix/makedefs
postfix/man/man5/header_checks.5
postfix/man/man5/mysql_table.5
postfix/man/man5/postconf.5
postfix/man/man8/smtp.8
postfix/mantools/postlink
postfix/proto/INSTALL.html
postfix/proto/MYSQL_README.html
postfix/proto/SMTPUTF8_README.html
postfix/proto/header_checks
postfix/proto/mysql_table
postfix/proto/postconf.proto
postfix/src/cleanup/cleanup_message.c
postfix/src/global/Makefile.in
postfix/src/global/header_body_checks.c
postfix/src/global/header_body_checks_strip.ref [new file with mode: 0644]
postfix/src/global/mail_params.h
postfix/src/global/mail_version.h
postfix/src/smtp/lmtp_params.c
postfix/src/smtp/smtp.c
postfix/src/smtp/smtp_connect.c
postfix/src/smtp/smtp_params.c
postfix/src/util/sys_compat.c
postfix/src/util/sys_defs.h

index 15e4052cfb4a09c81671a7c3f1329661414dfc1c..cae5b09da80d410b315ef5251b32f1729b616e3b 100644 (file)
@@ -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.
index d9ccf7a356baa14e61bde55a1a0540b01e21fd89..6d663c4c3f41e38e9c441260f2b4c27fbbcb75ef 100644 (file)
@@ -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     |
index 4854b2ffffaa56c61517b293a187740a6b84f768..4ac6493fd6492a86c5a11f24c3c62b043b0ae0c0 100644 (file)
@@ -565,9 +565,11 @@ The following is an extensive list of names and values.
 |_\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     |
index ec94785b468a58fb6b93a2731ddc2eeaf9715f0a..b8304c2212d4a7cb48c03bd1c6b440dac6fbcaaf 100644 (file)
@@ -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
 
 A\bAd\bdd\bdi\bit\bti\bio\bon\bna\bal\bl n\bno\bot\bte\bes\bs
index 68fb6c26fb28f9125b5f655f98b37c2008fdca32..dde8251ceeb9da66c1030391d88f995e88641d54 100644 (file)
@@ -60,6 +60,10 @@ main.cf:
     # 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:
 
index 1df78719e5f6b75c56acef9c4361ab24293b686f..97482e1d9355069095d73507164473b0b415a282 100644 (file)
@@ -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.
 
index d5984370f4bc0dd551b601519402b71fe78ef7ca..bcd96a97a0ba891c749f102f9f58d7c03282476a 100644 (file)
 #               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)
index e404714bff2f54170fdb9b7173ff8a24c9ec5e30..975a5ae390c00ab30cfcc8b42c34c8d7855c33be 100644 (file)
@@ -837,7 +837,9 @@ unreachable code. </td> </tr>
 <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
index a01b3fe7470fc39c5c3f6505ddacedd3206ae6a0..06a84aa3bfd5408226ccac6999345046074b0f8a 100644 (file)
@@ -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
 </pre>
 
index a40cf36b580b9fef32d12f98d0800704e2d17367..0aef65887d0c630bf1a026421fcb202233a86b4d 100644 (file)
@@ -104,6 +104,10 @@ parameter in <a href="postconf.5.html">main.cf</a>:</p>
 </pre>
 </blockquote>
 
+<p> (With Postfix &le; 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>
 
index dce6f7cc61ab0ead693fa1d935c128d687365763..caf15b5315abcd5c790e884e801bcedcf3a8f9aa 100644 (file)
@@ -260,7 +260,7 @@ HEADER_CHECKS(5)                                              HEADER_CHECKS(5)
               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
@@ -269,22 +269,34 @@ HEADER_CHECKS(5)                                              HEADER_CHECKS(5)
 
               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.
@@ -294,13 +306,13 @@ HEADER_CHECKS(5)                                              HEADER_CHECKS(5)
               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.
@@ -308,7 +320,7 @@ HEADER_CHECKS(5)                                              HEADER_CHECKS(5)
               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-
@@ -316,65 +328,72 @@ HEADER_CHECKS(5)                                              HEADER_CHECKS(5)
 
               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>
@@ -386,31 +405,31 @@ HEADER_CHECKS(5)                                              HEADER_CHECKS(5)
        <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>:
index cfd33171b8721e01699e888bdfda91c92dade402..8536c8430e3ee9bbb99a4090ec60f159e3a17ea9 100644 (file)
@@ -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:
+
+       <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
index 802ead38f86cb642837f359aaef788edd4b0f52a..094543e8764b84c47d30766ebee1ada0d3f9e0f3 100644 (file)
@@ -231,7 +231,7 @@ MYSQL_TABLE(5)                                                  MYSQL_TABLE(5)
 
               This parameter is available with Postfix 2.11 and later.
 
-       <b>option_group (Postfix</b> &gt;<b>=3.2: client; Postfix</b> &lt;<b>=3.1: empty)</b>
+       <b>option_group (default: Postfix</b> &gt;<b>=3.2: client,</b> &lt;<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.
 
index 1134ae35f861cfa37e4f4361ebbf6767bd961a17..166c8073f240f96f1b5c4126db17e694a3c3c02d 100644 (file)
@@ -5016,6 +5016,7 @@ parameter.  See there for details. </p>
 
 <p>
 The default TCP port that the Postfix LMTP client connects to.
+Specify a symbolic name (see services(5)) or a numeric port.
 </p>
 
 
@@ -11651,6 +11652,17 @@ during TLS startup and shutdown handshake procedures. </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>
index cfd33171b8721e01699e888bdfda91c92dade402..8536c8430e3ee9bbb99a4090ec60f159e3a17ea9 100644 (file)
@@ -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:
+
+       <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
index de92bdb869430362682c43052f6ec9b125179214..47fb8202f3b775ce557b726217c88ac3d088e409 100644 (file)
@@ -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.
index 68b452ffa8d7d1083d53ea273714e3d5717d0d28..31ac7dcaf69433f14178e13c4b0f05612fed5c05 100644 (file)
@@ -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
index 2227e268a90db27e834b41bdcd92512c84067556..1ef24d77914aef034cd11fbb3b1313fc0b7282d3 100644 (file)
@@ -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
index a22a09927fb9365b3c3b36b9bd625ac83631f6a4..1cebf490d403dbbd75fda21b1c8eb5acfeacd400 100644 (file)
@@ -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.
index 7d61f80e92d9cc8ec66b36e6eb6682a4d33de2f9..306620548aebd1808ca25fd4f210079fcaf2d86e 100644 (file)
@@ -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
index 0e4eb9c22c310a51a396a77ccd3c995a879437b5..2bb97ccf9ae098ee96d516c7f1f772ff71f7abee 100755 (executable)
@@ -517,6 +517,7 @@ while (<>) {
     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;
index ff17d4185bb06c22ce219913ab10f5957cedf2b4..7d30092057e6188596c25b436899670e5aeff19a 100644 (file)
@@ -837,7 +837,9 @@ unreachable code. </td> </tr>
 <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
index 78290b24a3831ecdd8f7c557b44c601b1daad7a5..3b37a006275aab32fe0a2ea9307a7140be4eeeec 100644 (file)
@@ -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
 </pre>
 
index 9f6e1c042287de88909f51ce4f5d1236c0012494..34a51c7d90d23541bdfa6d690f498b6094280925 100644 (file)
@@ -104,6 +104,10 @@ parameter in main.cf:</p>
 </pre>
 </blockquote>
 
+<p> (With Postfix &le; 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>
 
index e78ea081536ae1eaaf87a27c5122041c5f2adaf6..1aa6f5a712fd21a165a59f55270226184ddf5d61 100644 (file)
 #      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
index 9e0e7e472e62c7cc02b0a2f53748237103a509f2..cc51b0cb337119e26fc1b47ea1f17a60763637e4 100644 (file)
 #      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
index eb62ab0ea6b4ebf99f1b6cfb4f4bb49e8e590370..8bc5e6d36a7135797a0ed21121a5c30b97c77b1e 100644 (file)
@@ -7858,6 +7858,14 @@ lmtp_sasl_security_options = noplaintext
 
 <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
index b945cdc113ad865902b1bd94feb325eb61c16259..b468ac0db2cdfe50d557c0b2a0ac05c9c585ae37 100644 (file)
@@ -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))
index 793b3da77a2a3a626f073e44d804cc7acda31029..9cf134e31a9a41c24223591ae5abfe80f80aab5c 100644 (file)
@@ -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 \
+               <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
index f1e6469af427680853c7c23fee069fc597359417..e2fc4998934c9ac0ddc9ad763aad0ef729ec762b 100644 (file)
@@ -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 (file)
index 0000000..1e02075
--- /dev/null
@@ -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
index 3b2db0ac22cb30ef57af1b79bbdc6ab803190722..b4b51eb6d961c3919d017dc015f4c39eafae6003 100644 (file)
@@ -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
index 7369da5fd737cc124d8d1c52a2c0119add7b3f2b..03afe4a557c3f340258792dcde0b2926637e7795 100644 (file)
@@ -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
index 39f5e1368bf320e6b920bc9a1a0956a1ab603cb3..732d55434dc6ad9b9ec1757380d217789558a155 100644 (file)
@@ -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,
index 93a033e3310eb5cdb0479fe53b5a3eb30286acd8..b46d1e48396d81379dba1812c4c34293e2ec3e6e 100644 (file)
 /* .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;
index 1f5b1c1a3a89fecb63ea17a38b2ad48d20780c40..7eb0462cfa279a617039dee7d2d096d62360acdf 100644 (file)
@@ -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);
     }
 
     /*
index 34f83e80a35a37538666a045e389ece3b2583a92..d8628831d92674d0df9a21f18c69eb6953635958 100644 (file)
@@ -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,
index 6f3469ac7460368683697fe61c669247dae10771..04e3cfdf3cfa9d04d326a7cf8dcc2ef5a3ee0b3e 100644 (file)
@@ -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")];
index e3b4f8a59d8abb089b8941734fa8f11200521a28..e01b45ecd2d35134005ef583c5e6938adc20f03d 100644 (file)
@@ -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 <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