]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.2-20050214
authorWietse Venema <wietse@porcupine.org>
Mon, 14 Feb 2005 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:30:44 +0000 (06:30 +0000)
16 files changed:
postfix/HISTORY
postfix/RELEASE_NOTES
postfix/html/master.5.html
postfix/html/postconf.5.html
postfix/html/postsuper.1.html
postfix/man/man1/postsuper.1
postfix/man/man5/master.5
postfix/man/man5/postconf.5
postfix/proto/master
postfix/proto/postconf.proto
postfix/src/global/mail_version.h
postfix/src/master/master.c
postfix/src/master/master_ent.c
postfix/src/postsuper/postsuper.c
postfix/src/smtp/smtp_proto.c
postfix/src/smtpd/smtpd_check.c

index 47091f3e8589dd067da6e196468e8e7a28cb7742..a17d540cbe19cf5ac2f8d7c71a3c14b43a508cd4 100644 (file)
@@ -10127,7 +10127,7 @@ Apologies for any names omitted.
        Workaround: AIX 5.1 getaddrinfo() can't handle a "0" service
        argument. Instead we specify "1".  Files: util/inet_addr_host.c.
 
-20040513
+20050113
 
        Cleanup: now that the over-all structure is proving itself,
        clean up some internal APIs to increase robustness and get
@@ -10138,7 +10138,7 @@ Apologies for any names omitted.
        This reduces time for checking the Postfix queue. Files:
        conf/post-install, global/mail_params.h.
 
-20040514
+20050114
 
        Further cleanup: eliminate duplicate IPv6 results when the
        mynetworks value is generated by Postfix. More documentation
@@ -10193,7 +10193,7 @@ Apologies for any names omitted.
 
        Milestone: first non-non-production snapshot with TLS.
 
-20040524
+20050124
 
        Workaround: don't send mail to $fallback_relay if Postfix
        is MX host for the next-hop destination. This is, however,
@@ -10268,6 +10268,11 @@ Apologies for any names omitted.
        command examples. Files: mantools/manlint, mantools/fixman,
        mantools/postconf2man.
 
+20050205
+
+       Cleanup: updated the mass-deletion example in the postsuper
+       manual.
+
 20050206
 
        Cleanup: don't count a [45]XX SMTP server greeting towards
@@ -10350,7 +10355,7 @@ Apologies for any names omitted.
        mis-behaves when the current entry is deleted. File:
        tls/tls_scache.c.
 
-20040211
+20050211
 
        Cleanup: the "generics" feature (output address rewriting)
        is renamed to "generic", for consistency with "canonical"
index c8af0e056a6fbaaa3e0b05cb6222fb0c4965b700..69913f62a044daf1567958a6d8e4fd58c750d0d7 100644 (file)
@@ -13,7 +13,10 @@ Major changes with snapshot Postfix-2.2-20050212
 When header address rewriting is enabled, Postfix now updates a
 message header only when at least one address address in that header
 is modified.  Older Postfix versions first parse and then unparse
-a header so that there may be subtle changes in formatting.
+a header so that there may be subtle changes in formatting, such
+as the amount of whitespace between tokens, or in capitalization
+of header labels such as FROM:/CC: because they are not replaced
+by From:/Cc:.
 
 Major changes with snapshot Postfix-2.2-20050211
 ================================================
index 744144ab9a20024aeec18081ac4c7292e2e8dd5c..18e75f83a823a200dfddc40e2d089d5573f4187c 100644 (file)
@@ -73,14 +73,16 @@ MASTER(5)                                               MASTER(5)
                      (and colon) may be omitted.  Either host  or
                      port  may be given in symbolic form (host or
                      service name) or in numeric form (IP address
-                     or port number).
-
-                     Examples:  a  service  named  <b>127.0.0.1:smtp</b>
-                     receives mail  via  the  loopback  interface
-                     only; and a service named <b>10025</b> accepts con-
-                     nections on TCP port 10025  via  all  inter-
-                     faces  configured  with  the <b><a href="postconf.5.html#inet_interfaces">inet_interfaces</a></b>
-                     parameter.
+                     or  port  number).   Host information may be
+                     enclosed inside "[]", but this form  is  not
+                     necessary.
+
+                     Examples:  a service named <b>127.0.0.1:smtp</b> or
+                     <b>::1:smtp</b>  receives  mail  via  the  loopback
+                     interface  only;  and  a service named <b>10025</b>
+                     accepts connections on TCP  port  10025  via
+                     all    interfaces    configured   with   the
+                     <b><a href="postconf.5.html#inet_interfaces">inet_interfaces</a></b> parameter.
 
               <b>unix</b>   The service listens on a UNIX-domain  socket
                      and is accessible for local clients only.
index 382ecee9d9f76a434fc9390350167a9aa7ad9363..d5c18be3df4f66e74620367618be83b34134361a 100644 (file)
@@ -2601,9 +2601,12 @@ parameter also controls delivery of mail to <tt>user@[ip.address]</tt>.
 </p>
 
 <p>
-Note: you need to stop and start Postfix when this parameter changes.
+Note 1: you need to stop and start Postfix when this parameter changes.
 </p>
 
+<p> Note 2: address information may be enclosed inside <tt>[]</tt>,
+but this form is not recommended here. </p>
+
 <p> When <a href="postconf.5.html#inet_interfaces">inet_interfaces</a> specifies just one IPv4 and/or IPv6 address
 that is not a loopback address, the Postfix SMTP client will use
 this address as the IP source address for outbound mail. Support
@@ -5626,7 +5629,7 @@ IP hosting, but can be a problem on multi-homed firewalls. See the
 <a href="postconf.5.html#inet_interfaces">inet_interfaces</a> documentation for more detail. </p>
 
 <p> Note 2: address information may be enclosed inside <tt>[]</tt>,
-but this form is not recommended. </p>
+but this form is not recommended here. </p>
 
 
 </DD>
@@ -5659,7 +5662,7 @@ IP hosting, but can be a problem on multi-homed firewalls. See the
 <a href="postconf.5.html#inet_interfaces">inet_interfaces</a> documentation for more detail. </p>
 
 <p> Note 2: address information may be enclosed inside <tt>[]</tt>,
-but this form is not recommended. </p>
+but this form is not recommended here. </p>
 
 
 </DD>
index 6eca13e048ca91a9fc77575e508f0f51b6f6b0d2..c99a3dd34d7cb47188de0c50f828f31205e7b39e 100644 (file)
@@ -48,7 +48,7 @@ POSTSUPER(1)                                         POSTSUPER(1)
               mailq | tail +2 | awk  'BEGIN { RS = "" }
                   # $7=sender, $8=recipient1, $9=recipient2
                   { if ($8 == "user@example.com" &amp;&amp; $9 == "")
-                    print $1 }
+                        print $1 }
               ' | tr -d '*!' | postsuper -d -
 
               Specify <b>-d ALL</b> to remove all messages; for example,
index 0790904e527963b5be78c7577467e74bc9ae4ded..710287b84826e4b665ed82be946ea549356b4d75 100644 (file)
@@ -47,7 +47,7 @@ mailq | tail +2 | awk  \'BEGIN { RS = "" }
 # $7=sender, $8=recipient1, $9=recipient2
 .ti +4
 { if ($8 == "user@example.com" && $9 == "")
-.ti +6
+.ti +10
 print $1 }
 .br
 \' | tr -d '*!' | postsuper -d -
index e046e8909330fdc9c6db242696f1f94931a26408..832b7a5359887e8ade8c637ab3a37859bef2370b 100644 (file)
@@ -69,8 +69,11 @@ the host and port on which new connections should be
 accepted. The host part (and colon) may be omitted.  Either
 host or port may be given in symbolic form (host or service
 name) or in numeric form (IP address or port number).
+Host information may be enclosed inside "[]", but this form
+is not necessary.
 .sp
-Examples: a service named \fB127.0.0.1:smtp\fR receives
+Examples: a service named \fB127.0.0.1:smtp\fR or \fB::1:smtp\fR
+receives
 mail via the loopback interface only; and a service named
 \fB10025\fR accepts connections on TCP port 10025 via
 all interfaces configured with the \fBinet_interfaces\fR
index 73e5ec985a7aa5d89cc1f3e586f0f5e60cb16a75..481ba0e1ff59fe2e06527fd13ae26357b048ecb8 100644 (file)
@@ -1333,7 +1333,10 @@ interfaces (default), and "loopback-only" to receive mail
 on loopback network interfaces only (Postfix 2.2 and later).  The
 parameter also controls delivery of mail to <tt>user@[ip.address]</tt>.
 .PP
-Note: you need to stop and start Postfix when this parameter changes.
+Note 1: you need to stop and start Postfix when this parameter changes.
+.PP
+Note 2: address information may be enclosed inside <tt>[]</tt>,
+but this form is not recommended here.
 .PP
 When inet_interfaces specifies just one IPv4 and/or IPv6 address
 that is not a loopback address, the Postfix SMTP client will use
@@ -3086,7 +3089,7 @@ IP hosting, but can be a problem on multi-homed firewalls. See the
 inet_interfaces documentation for more detail.
 .PP
 Note 2: address information may be enclosed inside <tt>[]</tt>,
-but this form is not recommended.
+but this form is not recommended here.
 .SH smtp_bind_address6 (default: empty)
 An optional numerical network address that the SMTP client should
 bind to when making an IPv6 connection.
@@ -3113,7 +3116,7 @@ IP hosting, but can be a problem on multi-homed firewalls. See the
 inet_interfaces documentation for more detail.
 .PP
 Note 2: address information may be enclosed inside <tt>[]</tt>,
-but this form is not recommended.
+but this form is not recommended here.
 .SH smtp_connect_timeout (default: 30s)
 The SMTP client time limit for completing a TCP connection, or
 zero (use the operating system built-in time limit).
index bc037dfa9e1a0872ce3cc1ddad0611317bafec90..255ae7254a6701eaa37d568597bf3206bf09a020 100644 (file)
 #      accepted. The host part (and colon) may be omitted.  Either
 #      host or port may be given in symbolic form (host or service
 #      name) or in numeric form (IP address or port number).
+#      Host information may be enclosed inside "[]", but this form
+#      is not necessary.
 # .sp
-#      Examples: a service named \fB127.0.0.1:smtp\fR receives
+#      Examples: a service named \fB127.0.0.1:smtp\fR or \fB::1:smtp\fR
+#      receives
 #      mail via the loopback interface only; and a service named
 #      \fB10025\fR accepts connections on TCP port 10025 via
 #      all interfaces configured with the \fBinet_interfaces\fR
index 430ba604c2ee4940500204a81b692ed539a0d808..f6caa103948146d92c856114ba0ddb2dcd10992d 100644 (file)
@@ -1585,9 +1585,12 @@ parameter also controls delivery of mail to <tt>user@[ip.address]</tt>.
 </p>
 
 <p>
-Note: you need to stop and start Postfix when this parameter changes.
+Note 1: you need to stop and start Postfix when this parameter changes.
 </p>
 
+<p> Note 2: address information may be enclosed inside <tt>[]</tt>,
+but this form is not recommended here. </p>
+
 <p> When inet_interfaces specifies just one IPv4 and/or IPv6 address
 that is not a loopback address, the Postfix SMTP client will use
 this address as the IP source address for outbound mail. Support
@@ -3381,7 +3384,7 @@ IP hosting, but can be a problem on multi-homed firewalls. See the
 inet_interfaces documentation for more detail. </p>
 
 <p> Note 2: address information may be enclosed inside <tt>[]</tt>,
-but this form is not recommended. </p>
+but this form is not recommended here. </p>
 
 %PARAM smtp_bind_address6 
 
@@ -3410,7 +3413,7 @@ IP hosting, but can be a problem on multi-homed firewalls. See the
 inet_interfaces documentation for more detail. </p>
 
 <p> Note 2: address information may be enclosed inside <tt>[]</tt>,
-but this form is not recommended. </p>
+but this form is not recommended here. </p>
 
 %PARAM smtp_connection_cache_time_limit 2s
 
index 623eaac403494139cdbef681a8d45a3fd285b548..7303514eef99721448d49724f6e60cf866beb6c2 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change the patchlevel and the release date. Snapshots change the
   * release date only.
   */
-#define MAIL_RELEASE_DATE      "20050212"
+#define MAIL_RELEASE_DATE      "20050214"
 #define MAIL_VERSION_NUMBER    "2.2"
 
 #define VAR_MAIL_VERSION       "mail_version"
index 8e498555f785af54b6f53a8a5dc418daffea41f0..111be648f162c991375030cb93b93cc6418d9b51 100644 (file)
@@ -289,7 +289,7 @@ int     main(int argc, char **argv)
      * all MTA processes cleanly. Give up if we can't separate from our
      * parent process. We're not supposed to blow away the parent.
      */
-    if (setsid() == -1)
+    if (debug_me == 0 && setsid() == -1)
        msg_fatal("unable to set session and process group ID: %m");
 
     /*
index ea6d60b8160baf6b1d458766124f523c69631456..bff76d0eb2a0e4024e382e50dafcc125583de212 100644 (file)
@@ -225,8 +225,8 @@ MASTER_SERV *get_master_ent()
     MASTER_SERV *serv;
     char   *cp;
     char   *name;
-    char   *host;
-    char   *port;
+    char   *host = 0;
+    char   *port = 0;
     char   *transport;
     int     private;
     int     unprivileged;              /* passed on to child */
@@ -323,7 +323,6 @@ MASTER_SERV *get_master_ent()
            serv->listen_fd_count = MASTER_INET_ADDRLIST(serv)->used;
        }
        MASTER_INET_PORT(serv) = mystrdup(port);
-       myfree(atmp);
     } else if (STR_SAME(transport, MASTER_XPORT_NAME_UNIX)) {
        serv->type = MASTER_SERV_TYPE_UNIX;
        serv->listen_fd_count = 1;
@@ -349,9 +348,39 @@ MASTER_SERV *get_master_ent()
      * attributes such as privacy.
      */
     if (serv->type == MASTER_SERV_TYPE_INET) {
+       MAI_HOSTADDR_STR host_addr;
+       MAI_SERVPORT_STR serv_port;
+       struct addrinfo *res0;
+
        if (private)
            fatal_with_context("inet service cannot be private");
-       serv->name = mystrdup(name);
+#ifdef SNAPSHOT
+       if (*host == 0)
+           host = 0;
+       /* Canonicalize numeric host and numeric or symbolic service. */
+       if (hostaddr_to_sockaddr(host, port, 0, &res0) == 0) {
+           SOCKADDR_TO_HOSTADDR(res0->ai_addr, res0->ai_addrlen,
+                                host ? &host_addr : (MAI_HOSTADDR_STR *) 0,
+                                &serv_port, 0);
+           serv->name = (host ? concatenate("[", host_addr.buf, "]:",
+                                            serv_port.buf, (char *) 0) :
+                         mystrdup(serv_port.buf));
+           freeaddrinfo(res0);
+       } 
+       /* Canonicalize numeric or symbolic service. */
+       else if (hostaddr_to_sockaddr((char *) 0, port, 0, &res0) == 0) {
+           SOCKADDR_TO_HOSTADDR(res0->ai_addr, res0->ai_addrlen,
+                                (MAI_HOSTADDR_STR *) 0, &serv_port, 0);
+           serv->name = (host ? concatenate("[", host, "]:",
+                                            serv_port.buf, (char *) 0) :
+                         mystrdup(serv_port.buf));
+           freeaddrinfo(res0);
+       } 
+       /* Bad service name? */
+       else
+#endif
+           serv->name = mystrdup(name);
+       myfree(atmp);
     } else if (serv->type == MASTER_SERV_TYPE_UNIX) {
        serv->name = mail_pathname(private ? MAIL_CLASS_PRIVATE :
                                   MAIL_CLASS_PUBLIC, name);
index eba72e685590818e769bfe10bfb0163e38615b85..633e0a42ad6dff726787fcf4eac973a5245b3ff6 100644 (file)
@@ -41,7 +41,7 @@
 /*     # $7=sender, $8=recipient1, $9=recipient2
 /* .ti +4
 /*     { if ($8 == "user@example.com" && $9 == "")
-/* .ti +6
+/* .ti +10
 /*     print $1 }
 /* .br
 /*     \' | tr -d '*!' | postsuper -d -
index 3f87513df05d636802172a93db7052dcf5f31c8d..b95e7aa275b65df3bb2b134b91d441c8d3d612f7 100644 (file)
 /*
 /*     smtp_rset() sends a single RSET command and waits for the
 /*     response. In case of no response, or negative response, it
-/*     turns off caching for the current session.
+/*     turns off connection caching.
 /*
 /*     smtp_quit() sends a single QUIT command and waits for the
-/*     response if configured to do so. It always turns off caching
-/*     for the current session.
+/*     response if configured to do so. It always turns off connection
+/*     caching.
 /* DIAGNOSTICS
 /*     smtp_helo(), smtp_xfer(), smtp_rset() and smtp_quit() return
 /*     0 in case of success, -1 in case of failure. For smtp_xfer(),
@@ -757,7 +757,7 @@ static void smtp_header_rewrite(void *context, int header_class,
        addr_list = tok822_grep(tree, TOK822_ADDR);
        for (tpp = addr_list; *tpp; tpp++)
            did_rewrite |= smtp_map11_tree(tpp[0], smtp_generic_maps,
-                                   smtp_ext_prop_mask & EXT_PROP_GENERIC);
+                                    smtp_ext_prop_mask & EXT_PROP_GENERIC);
        if (did_rewrite) {
            vstring_sprintf(buf, "%s: ", header_info->name);
            tok822_externalize(buf, tree, TOK822_STR_HEAD);
@@ -780,6 +780,8 @@ static void smtp_header_rewrite(void *context, int header_class,
      * possible (without rearranging the order of addresses). Prepending
      * white space to the beginning of lines is delegated to the output
      * routine.
+     * 
+     * Code derived from cleanup_fold_header().
      */
     for (line = start = vstring_str(buf); line != 0; line = next_line) {
        end_line = line + strcspn(line, "\n");
@@ -798,6 +800,8 @@ static void smtp_header_rewrite(void *context, int header_class,
      * rewriting machinery. Just like smtp_header_out(), this code destroys
      * the header. We could try to avoid clobbering it, but we're not going
      * to use the data any further.
+     * 
+     * Code derived from cleanup_out_header().
      */
     for (line = start = vstring_str(buf); line != 0; line = next_line) {
        next_line = split_at(line, '\n');
index 1b75437015ce6d9ea3e118c1ff1e7513c1be0741..786df955efcaadc207067a9b0480542a37a65330 100644 (file)
@@ -3208,6 +3208,7 @@ static int generic_checks(SMTPD_STATE *state, ARGV *restrictions,
            DEFER_IF_REJECT2(state, MAIL_ERROR_POLICY,
                         "450 <%s>: %s rejected: defer_if_reject requested",
                             reply_name, reply_class);
+#ifdef SNAPSHOT
        } else if (strcasecmp(name, SLEEP) == 0) {
            if (cpp[1] == 0 || alldig(cpp[1]) == 0) {
                msg_warn("restriction %s must be followed by number", SLEEP);
@@ -3215,6 +3216,7 @@ static int generic_checks(SMTPD_STATE *state, ARGV *restrictions,
                    MAIL_ERROR_SOFTWARE, "451 Server configuration error"));
            } else
                sleep(atoi(*++cpp));
+#endif
        }
 
        /*