]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.2-20041020
authorWietse Venema <wietse@porcupine.org>
Wed, 20 Oct 2004 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:30:03 +0000 (06:30 +0000)
13 files changed:
postfix/HISTORY
postfix/RELEASE_NOTES
postfix/html/postconf.5.html
postfix/html/smtpd.8.html
postfix/man/man5/postconf.5
postfix/man/man8/smtpd.8
postfix/proto/postconf.proto
postfix/src/global/mail_params.h
postfix/src/global/mail_version.h
postfix/src/global/rewrite_clnt.in
postfix/src/global/rewrite_clnt.ref
postfix/src/smtpd/smtpd.c
postfix/src/smtpd/smtpd_check.c

index 640ded7133c7fcfdf28d83a1fa4815cc75f910ed..6d892e6aaf440a4f035ebdfc3ab47861d7b9b9b3 100644 (file)
@@ -9791,11 +9791,10 @@ Apologies for any names omitted.
        The new "none" address rewriting context does not modify
        message header addresses at all.
 
-       Postfix uses the "local" rewriting context for mail from
-       the machine itself, from clients listed with the
-       local_rewrite_context_clients parameter (default:
-       $inet_interfaces $mynetworks) and from SASL authenticated
-       clients.
+       Postfix uses the "local" rewriting context for mail posted
+       with Postfix sendmail, from clients listed with the
+       local_rewrite_context_clients parameter (default:  $mynetworks)
+       and from SASL authenticated clients.
 
        The context specified with remote_rewrite_context_name is
        used for all other clients. The default setting is backwards
index 86a10ec85e87e19a98bff04e8b8fc10d3519b77a..26b78eade3d46ae805890d87b3182c81eaf5b277 100644 (file)
@@ -10,9 +10,14 @@ issued for snapshot releases.
 Incompatible changes with snapshot Postfix-2.2-20041019
 =======================================================
 
+You must reload or restart Postfix, because the protocol between
+queue manager and delivery agents has changed.  If you forget this,
+mail will remain queued until you restart/reload Postfix.
+
 Support for return addresses in the non-standard Errors-To: message
 headers is removed. It was already disabled by default with Postfix
-version 2.1.
+version 2.1. Since it is non-standard, there was no guarantee that
+it would have effect on other MTAs.
 
 Major changes with snapshot Postfix-2.2-20041019
 ================================================
@@ -36,17 +41,15 @@ and whether headers are rewritten at all.
 
 The "local" address rewriting context is used for mail submitted
 with the Postfix sendmail command, for mail from clients that match
-$local_header_rewrite_context_clients (default: $inet_interfaces
-$mynetworks), and for mail from SASL authenticated clients.  It is
-not automatically used for pop-before-smtp clients; you'll have to
-specify their lookup table via the local_header_rewrite_context_clients
-parameter.
+$local_header_rewrite_context_clients (default:  $mynetworks), and
+for mail from SASL authenticated clients.  It is not automatically
+used for pop-before-smtp clients; you'll have to specify their
+lookup table via the local_header_rewrite_context_clients parameter.
 
 The smtpd_remote_header_rewrite_context parameter specifies the
-address
-rewriting context for remote mail. The backwards compatible default
-is "local".  Purists will specify "none", so that Postfix does not
-modify headers (not even with canonical mappings or address
+address rewriting context for remote mail. The backwards compatible
+default is "local".  Purists will specify "none", so that Postfix
+does not modify headers (not even with canonical mappings or address
 masquerading).
 
 Postix always uses the "local" context for envelope addresses,
index 91dc67b4d3c9a6aa38b5da4b2e81245d6b04a25a..a49dd406ec0b2656a3c5e5da10072d3150e947d0 100644 (file)
@@ -3083,24 +3083,34 @@ into concurrency per domain.  </p>
 </DD>
 
 <DT><b><a name="local_header_rewrite_context_clients">local_header_rewrite_context_clients</a>
-(default: $<a href="postconf.5.html#inet_interfaces">inet_interfaces</a>
-$<a href="postconf.5.html#mynetworks">mynetworks</a>)</b></DT><DD>
+(default: $<a href="postconf.5.html#mynetworks">mynetworks</a>)</b></DT><DD>
 
 <p> Append the domain names in $<a href="postconf.5.html#myorigin">myorigin</a> and $<a href="postconf.5.html#mydomain">mydomain</a> to incomplete
 message header addresses from these clients.  </p>
 
 <p> Specify a list of network addresses or network/netmask patterns,
-separated by comma or whitespace. The list is matched left to right,
-and the search stops on the first match.  Specify !address or
-!network/netmask to exclude an address or network block from the
-list.  A network mask specifies the number of bits in the network
-part of a host address. Continue long lines by starting the next
-line with whitespace. </p>
+separated by comma or whitespace. Continue long lines by starting
+the next line with whitespace. </p>
+
+<p> A network mask specifies the number of bits in the network part
+of a host address.  You can also specify "/file/name" or "<a href="DATABASE_README.html">type:table</a>"
+patterns.  A "/file/name" pattern is replaced by its contents; a
+"<a href="DATABASE_README.html">type:table</a>" lookup table is matched when a client name or address
+matches a lookup key (the lookup result is ignored). </p>
+
+<p> The list is matched left to right, and the search stops on the
+first match.  Specify "!pattern" to exclude an address or network
+block from the list.  </p>
+
+<p>
+Examples:
+</p>
 
-<p> You can also specify "/file/name" or "<a href="DATABASE_README.html">type:table</a>" patterns.
-A "/file/name" pattern is replaced by its contents; a "<a href="DATABASE_README.html">type:table</a>"
-lookup table is matched when a client name or address matches a
-lookup key (the lookup result is ignored). </p>
+<pre>
+<a href="postconf.5.html#local_header_rewrite_context_clients">local_header_rewrite_context_clients</a> = $<a href="postconf.5.html#mynetworks">mynetworks</a>
+<a href="postconf.5.html#local_header_rewrite_context_clients">local_header_rewrite_context_clients</a> = !192.168.0.1 $<a href="postconf.5.html#mynetworks">mynetworks</a>
+<a href="postconf.5.html#local_header_rewrite_context_clients">local_header_rewrite_context_clients</a> = static:all
+</pre>
 
 
 </DD>
@@ -3967,22 +3977,25 @@ If you specify the <a href="postconf.5.html#mynetworks">mynetworks</a> list by h
 Postfix ignores the <a href="postconf.5.html#mynetworks_style">mynetworks_style</a> setting.
 </p>
 
-<p>
-Specify a list of network/netmask patterns, separated by commas
-and/or whitespace. The mask specifies the number of bits in the
-network part of a host address.  You can also specify "/file/name"
-or "<a href="DATABASE_README.html">type:table</a>" patterns.  A "/file/name" pattern is replaced by
-its contents; a "<a href="DATABASE_README.html">type:table</a>" lookup table is matched when a table
-entry matches a lookup string (the lookup result is ignored).
-Continue long lines by starting the next line with whitespace.
-</p>
+<p> Specify a list of network addresses or network/netmask patterns,
+separated by commas and/or whitespace. Continue long lines by
+starting the next line with whitespace. </p>
 
-<p>
-Examples:
-</p>
+<p> The netmask specifies the number of bits in the network part
+of a host address.  You can also specify "/file/name" or "<a href="DATABASE_README.html">type:table</a>"
+patterns.  A "/file/name" pattern is replaced by its contents; a
+"<a href="DATABASE_README.html">type:table</a>" lookup table is matched when a table entry matches a
+lookup string (the lookup result is ignored). </p>
+
+<p> The list is matched left to right, and the search stops on the
+first match.  Specify "!pattern" to exclude an address or network
+block from the list.  </p>
+
+<p> Examples:  </p>
 
 <pre>
 <a href="postconf.5.html#mynetworks">mynetworks</a> = 168.100.189.0/28, 127.0.0.0/8
+<a href="postconf.5.html#mynetworks">mynetworks</a> = !192.168.0.1, 192.168.0.0/28
 <a href="postconf.5.html#mynetworks">mynetworks</a> = $<a href="postconf.5.html#config_directory">config_directory</a>/mynetworks
 <a href="postconf.5.html#mynetworks">mynetworks</a> = hash:/etc/postfix/network_table
 </pre>
index ebb5c37b4eecd10fed81b89c99ef94d666db88d1..a4aee5498e3596db37fa89ce4982ae3a1c2af03d 100644 (file)
@@ -110,8 +110,7 @@ SMTPD(8)                                                 SMTPD(8)
 
        Available in Postfix version 2.2 and later:
 
-       <b><a href="postconf.5.html#local_header_rewrite_context_clients">local_header_rewrite_context_clients</a>     ($<a href="postconf.5.html#inet_interfaces">inet_interfaces</a></b>
-       <b>$<a href="postconf.5.html#mynetworks">mynetworks</a>)</b>
+       <b><a href="postconf.5.html#local_header_rewrite_context_clients">local_header_rewrite_context_clients</a> ($<a href="postconf.5.html#mynetworks">mynetworks</a>)</b>
               Append the domain names in $<a href="postconf.5.html#myorigin">myorigin</a> and  $<a href="postconf.5.html#mydomain">mydomain</a>
               to  incomplete  message header addresses from these
               clients.
index 5537e4ad48096033dc447f15aad6972141e065ac..ed6453d35b1c3f4069c0304f3244c4c97931dfb6 100644 (file)
@@ -1564,25 +1564,35 @@ the entry in the master.cf file.
 Setting this parameter to a value > 1 changes the meaning of
 local_destination_concurrency_limit from concurrency per recipient
 into concurrency per domain.
-<DT>\fBlocal_header_rewrite_context_clients
-(default: $inet_interfaces
-$mynetworks)\fR</DT><DD>
-.PP
+.SH local_header_rewrite_context_clients (default: $mynetworks)
 Append the domain names in $myorigin and $mydomain to incomplete
 message header addresses from these clients.
 .PP
 Specify a list of network addresses or network/netmask patterns,
-separated by comma or whitespace. The list is matched left to right,
-and the search stops on the first match.  Specify !address or
-!network/netmask to exclude an address or network block from the
-list.  A network mask specifies the number of bits in the network
-part of a host address. Continue long lines by starting the next
-line with whitespace.
-.PP
-You can also specify "/file/name" or "type:table" patterns.
-A "/file/name" pattern is replaced by its contents; a "type:table"
-lookup table is matched when a client name or address matches a
-lookup key (the lookup result is ignored).
+separated by comma or whitespace. Continue long lines by starting
+the next line with whitespace.
+.PP
+A network mask specifies the number of bits in the network part
+of a host address.  You can also specify "/file/name" or "type:table"
+patterns.  A "/file/name" pattern is replaced by its contents; a
+"type:table" lookup table is matched when a client name or address
+matches a lookup key (the lookup result is ignored).
+.PP
+The list is matched left to right, and the search stops on the
+first match.  Specify "!pattern" to exclude an address or network
+block from the list.
+.PP
+Examples:
+.PP
+.nf
+.na
+.ft C
+local_header_rewrite_context_clients = $mynetworks
+local_header_rewrite_context_clients = !192.168.0.1 $mynetworks
+local_header_rewrite_context_clients = static:all
+.fi
+.ad
+.ft R
 .SH local_recipient_maps (default: proxy:unix:passwd.byname $alias_maps)
 Lookup tables with all names or addresses of local recipients:
 a recipient address is local when its domain matches $mydestination,
@@ -2058,13 +2068,19 @@ information.
 If you specify the mynetworks list by hand,
 Postfix ignores the mynetworks_style setting.
 .PP
-Specify a list of network/netmask patterns, separated by commas
-and/or whitespace. The mask specifies the number of bits in the
-network part of a host address.  You can also specify "/file/name"
-or "type:table" patterns.  A "/file/name" pattern is replaced by
-its contents; a "type:table" lookup table is matched when a table
-entry matches a lookup string (the lookup result is ignored).
-Continue long lines by starting the next line with whitespace.
+Specify a list of network addresses or network/netmask patterns,
+separated by commas and/or whitespace. Continue long lines by
+starting the next line with whitespace.
+.PP
+The netmask specifies the number of bits in the network part
+of a host address.  You can also specify "/file/name" or "type:table"
+patterns.  A "/file/name" pattern is replaced by its contents; a
+"type:table" lookup table is matched when a table entry matches a
+lookup string (the lookup result is ignored).
+.PP
+The list is matched left to right, and the search stops on the
+first match.  Specify "!pattern" to exclude an address or network
+block from the list.
 .PP
 Examples:
 .PP
@@ -2072,6 +2088,7 @@ Examples:
 .na
 .ft C
 mynetworks = 168.100.189.0/28, 127.0.0.0/8
+mynetworks = !192.168.0.1, 192.168.0.0/28
 mynetworks = $config_directory/mynetworks
 mynetworks = hash:/etc/postfix/network_table
 .fi
index 617c75dc3deb9eee2b1955b200228dfbe0e1f01d..df282740453ee131998bd216672baa2eed6f851d 100644 (file)
@@ -112,7 +112,7 @@ Enable or disable recipient validation, built-in content
 filtering, or address mapping.
 .PP
 Available in Postfix version 2.2 and later:
-.IP "\fBlocal_header_rewrite_context_clients ($inet_interfaces $mynetworks)\fR"
+.IP "\fBlocal_header_rewrite_context_clients ($mynetworks)\fR"
 Append the domain names in $myorigin and $mydomain to incomplete
 message header addresses from these clients.
 .IP "\fBremote_header_rewrite_context_name (local)\fR"
index f0d306f12ee2d58b7c17331dcf8690a00292d998..bc3a9e116dbb996b1eee392fedbf578111400313 100644 (file)
@@ -2481,22 +2481,25 @@ If you specify the mynetworks list by hand,
 Postfix ignores the mynetworks_style setting.
 </p>
 
-<p>
-Specify a list of network/netmask patterns, separated by commas
-and/or whitespace. The mask specifies the number of bits in the
-network part of a host address.  You can also specify "/file/name"
-or "type:table" patterns.  A "/file/name" pattern is replaced by
-its contents; a "type:table" lookup table is matched when a table
-entry matches a lookup string (the lookup result is ignored).
-Continue long lines by starting the next line with whitespace.
-</p>
+<p> Specify a list of network addresses or network/netmask patterns,
+separated by commas and/or whitespace. Continue long lines by
+starting the next line with whitespace. </p>
 
-<p>
-Examples:
-</p>
+<p> The netmask specifies the number of bits in the network part
+of a host address.  You can also specify "/file/name" or "type:table"
+patterns.  A "/file/name" pattern is replaced by its contents; a
+"type:table" lookup table is matched when a table entry matches a
+lookup string (the lookup result is ignored). </p>
 
-<pre>
+<p> The list is matched left to right, and the search stops on the
+first match.  Specify "!pattern" to exclude an address or network
+block from the list.  </p>
+
+<p> Examples:  </p>
+
+<pre> 
 mynetworks = 168.100.189.0/28, 127.0.0.0/8
+mynetworks = !192.168.0.1, 192.168.0.0/28
 mynetworks = $config_directory/mynetworks
 mynetworks = hash:/etc/postfix/network_table
 </pre>
@@ -7215,24 +7218,35 @@ remote clients, when $remote_header_rewrite_context_name is set to
 "invalid".  This is one way to avoid appending your own domain to
 addresses in spam from poorly written software. </p>
 
-%PARAM local_header_rewrite_context_clients $inet_interfaces
-$mynetworks
+%PARAM local_header_rewrite_context_clients $mynetworks
 
 <p> Append the domain names in $myorigin and $mydomain to incomplete
 message header addresses from these clients.  </p>
 
 <p> Specify a list of network addresses or network/netmask patterns,
-separated by comma or whitespace. The list is matched left to right,
-and the search stops on the first match.  Specify !address or
-!network/netmask to exclude an address or network block from the
-list.  A network mask specifies the number of bits in the network
-part of a host address. Continue long lines by starting the next
-line with whitespace. </p>
-
-<p> You can also specify "/file/name" or "type:table" patterns.
-A "/file/name" pattern is replaced by its contents; a "type:table"
-lookup table is matched when a client name or address matches a
-lookup key (the lookup result is ignored). </p>
+separated by comma or whitespace. Continue long lines by starting
+the next line with whitespace. </p>
+
+<p> A network mask specifies the number of bits in the network part
+of a host address.  You can also specify "/file/name" or "type:table"
+patterns.  A "/file/name" pattern is replaced by its contents; a
+"type:table" lookup table is matched when a client name or address
+matches a lookup key (the lookup result is ignored). </p>
+
+<p> The list is matched left to right, and the search stops on the
+first match.  Specify "!pattern" to exclude an address or network
+block from the list.  </p>
+
+
+<p>
+Examples:
+</p>
+
+<pre>
+local_header_rewrite_context_clients = $mynetworks
+local_header_rewrite_context_clients = !192.168.0.1 $mynetworks
+local_header_rewrite_context_clients = static:all
+</pre>
 
 %PARAM remote_header_rewrite_context_name local
 
index 1c59cc3be7e74e18ec6f7889e3b22c1d7c57aa62..cfc481674f61497291fd0da646391d67fc987238 100644 (file)
@@ -2104,8 +2104,7 @@ extern char *var_remote_rwr_name;
 #define REWRITE_NONE   "none"
 
 #define VAR_LOC_RWR_CLIENTS            "local_header_rewrite_context_clients"
-#define DEF_LOC_RWR_CLIENTS            "$" VAR_INET_INTERFACES \
-                                       " $" VAR_MYNETWORKS
+#define DEF_LOC_RWR_CLIENTS            "$" VAR_MYNETWORKS
 extern char *var_local_rwr_clients;
 
 /* LICENSE
index 98f0e70924afec7aa6972477ab5f947c88d1895d..ac7e0201906529c23a2b7c4884dabf1f7e27006f 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change the patchlevel and the release date. Snapshots change the
   * release date only.
   */
-#define MAIL_RELEASE_DATE      "20041019"
+#define MAIL_RELEASE_DATE      "20041020"
 #define MAIL_VERSION_NUMBER    "2.2"
 
 #define VAR_MAIL_VERSION       "mail_version"
index a66fc206410aab65f4016f488f54c51a0a2082b8..87a679610fb5e0d85a07ad8c48dc2c5324046821 100644 (file)
@@ -1,16 +1,16 @@
-canonical !
-canonical a!
-canonical !b
-canonical a!b
-canonical %
-canonical a%
-canonical %b
-canonical a%b
-canonical @
-canonical a@
-canonical a@.
-canonical a@b
-canonical a@b.
+local !
+local a!
+local !b
+local a!b
+local %
+local a%
+local %b
+local a%b
+local @
+local a@
+local a@.
+local a@b
+local a@b.
 invalid !
 invalid a!
 invalid !b
index 328d0e1a189a1eb126492849f4d188c681b9769c..d846a4dd7664d6768d7350fdca3de7aec03a0194 100644 (file)
@@ -1,52 +1,52 @@
-rule       canonical
+rule       local
 address    !
 result     ""@
 
-rule       canonical
+rule       local
 address    a!
 result     ""@a.MYDOMAIN
 
-rule       canonical
+rule       local
 address    !b
 result     b@
 
-rule       canonical
+rule       local
 address    a!b
 result     b@a.MYDOMAIN
 
-rule       canonical
+rule       local
 address    %
 result     ""@
 
-rule       canonical
+rule       local
 address    a%
 result     a@
 
-rule       canonical
+rule       local
 address    %b
 result     ""@b.MYDOMAIN
 
-rule       canonical
+rule       local
 address    a%b
 result     a@b.MYDOMAIN
 
-rule       canonical
+rule       local
 address    @
 result     ""
 
-rule       canonical
+rule       local
 address    a@
 result     a@
 
-rule       canonical
+rule       local
 address    a@.
 result     a@.
 
-rule       canonical
+rule       local
 address    a@b
 result     a@b.MYDOMAIN
 
-rule       canonical
+rule       local
 address    a@b.
 result     a@b
 
index 041e65512f21ce81e20370a8ea5b51e502f9347e..0f6d945354fec44f410160bce511a9c2bc553c12 100644 (file)
@@ -94,7 +94,7 @@
 /*     filtering, or address mapping.
 /* .PP
 /*     Available in Postfix version 2.2 and later:
-/* .IP "\fBlocal_header_rewrite_context_clients ($inet_interfaces $mynetworks)\fR"
+/* .IP "\fBlocal_header_rewrite_context_clients ($mynetworks)\fR"
 /*     Append the domain names in $myorigin and $mydomain to incomplete
 /*     message header addresses from these clients.
 /* .IP "\fBremote_header_rewrite_context_name (local)\fR"
@@ -2372,6 +2372,8 @@ static int xforward_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
             * DOMAIN=local or remote.
             */
        case SMTPD_STATE_XFORWARD_DOMAIN:
+           if (STREQ(attr_value, XFORWARD_UNAVAILABLE))
+               attr_value = XFORWARD_DOM_LOCAL;
            context_name[1] = var_remote_rwr_name;
            if ((context_code = name_code(xforward_to_context,
                                          NAME_CODE_FLAG_NONE,
@@ -2717,12 +2719,6 @@ static void smtpd_service(VSTREAM *stream, char *service, char **argv)
     state.xforward_allowed =
        namadr_list_match(xforward_hosts, state.name, state.addr);
 
-    /*
-     * Choose a default address rewriting context. This should be made more
-     * configurable.
-     */
-    smtpd_check_rewrite(&state);
-
     /*
      * See if we need to turn on verbose logging for this client.
      */
index bcd65f1663192b78e0d19096b84a62a175f3086d..593d42cfcec9e95e12db6a56d8b3f5fdfb5a14b5 100644 (file)
@@ -3378,11 +3378,10 @@ void    smtpd_check_rewrite(SMTPD_STATE *state)
 #define NOT_SASL_AUTHENTICATED 0
 
     /*
-     * XXX We want to be able to use !pattern to make exceptions, but then we
-     * should not confuse matters by mixing names with addresses.
+     * XXX We accept same syntax as mynetwork.
      */
     if (SMTPD_STAND_ALONE(state)
-       || namadr_list_match(local_rewrite_clients, " ", state->addr)
+       || namadr_list_match(local_rewrite_clients, state->name, state->addr)
 #ifdef USE_SASL_AUTH
        || permit_sasl_auth(state, SASL_AUTHENTICATED,
                            NOT_SASL_AUTHENTICATED)