]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
snapshot-20011030
authorWietse Venema <wietse@porcupine.org>
Tue, 30 Oct 2001 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:27:30 +0000 (06:27 +0000)
18 files changed:
postfix/DB_README
postfix/HISTORY
postfix/INSTALL
postfix/conf/sample-filter.cf
postfix/conf/sample-smtpd.cf
postfix/errors_to [deleted file]
postfix/src/bounce/bounce.c
postfix/src/cleanup/cleanup.c
postfix/src/cleanup/cleanup.h
postfix/src/cleanup/cleanup_api.c
postfix/src/cleanup/cleanup_map1n.c
postfix/src/cleanup/cleanup_out_recipient.c
postfix/src/flush/flush.c
postfix/src/global/mail_version.h
postfix/src/global/post_mail.c
postfix/src/local/forward.c
postfix/src/util/attr_print.c
postfix/src/util/attr_scan.c

index 49cf41c30c12421b75bef309c0af5c3ba879ff33..453aff676a566f3218263cfb4073d757c984a781 100644 (file)
@@ -48,6 +48,11 @@ compatible with that of versions 2 and 3 (versions 2 and 3 have
 the same format). If you switch between DB versions, then you may
 have to rebuild all your Postfix DB files.
 
+Warning: if you use Berkeley DB version 2 or later, do not enable
+DB 1.85 compatibility mode. Doing so would break file locking on
+Solaris, HP-UX, UNIXWARE, IRIX and other systems, causing mail to
+be lost when you update a table while Postfix is running.
+
 Building Postfix on Linux with a specific Berkeley DB version
 =============================================================
 
index fffd1d750699001148934e45b2484b913c92241b..11a84fe116d696e685d47f9abab79f0673edf777 100644 (file)
@@ -5489,19 +5489,20 @@ Apologies for any names omitted.
 
 20011010
 
-       Specify the name of the UNIX-domain socket (instead of
-       "unknown stream") when a Postfix daemon complains about a
-       malformed client request. Files:  master/*server.c.
+       Postfix daemons now print the name of the UNIX-domain socket
+       (instead of "unknown stream") complaining about a malformed
+       client request. Files:  master/*server.c.
 
 20011010-14
 
        Replaced the internal protocols by (name,value) attribute
        lists. This gives better error detection when we start
-       making changes to internal protocols.
+       making changes to internal protocols, and allows new
+       attributes to be introduced without breaking protocols.
 
 20011015
 
-       Put base 64 encoding into place on the replced internal
+       Put base 64 encoding into place on the replaced internal
        protocols.  Files: util/base64_code.[hc].
 
        Feature: header/body REJECT rules can now end in text that
@@ -5524,13 +5525,18 @@ Apologies for any names omitted.
 
 Open problems:
 
+       Medium: need in-process caching for map lookups.
+
        Minor: The $process_id_directory setting is not used anywhere
        in Postfix. Problem reported by Michael Smith, texas.net.
        This should either be documented, or better, the code should
-       issue a warning to set a read-only parameter.
+       warn about attempts to set a read-only parameter.
 
        Medium: address rewriting should be on/off configurable
        for envelopes and/or headers.
 
-       Medium: smtpd access maps doesn't understand the recipient
+       Medium: smtpd access maps don't understand the recipient
        delimiter setting.
+
+       Low: the virtual delivery agent needs a way to specify
+       fixed uid/gid for all deliveries.
index 6e74ebcbf16cd8533c633ce22b309120b733d5e6..822158c19654bea649d3ca128e5e33bdd9825aef 100644 (file)
@@ -152,15 +152,16 @@ In any case, if the command
     % make
 
 produces compiler error messages, it may be time to examine the
-FAQ document.
+FAQ document (see htlm/faq.html).
 
 5 - Porting to on an unsupported system
 =======================================
 
-- Choose a SYSTEMTYPE name for the new system. Please use a name
-that includes the major version of the operating system (such as
-SUNOS4 or LINUX2), so that different releases of the same system
-can be supported without confusion.
+- Each system type is identified by a unique name. Examples:
+SUNOS5, FREEBSD4, and so on.  Choose a SYSTEMTYPE name for the new
+system. You must use a name that includes at least the major version
+of the operating system (such as SUNOS4 or LINUX2), so that different
+releases of the same system can be supported without confusion.
 
 - Add a case statement to the "makedefs" shell script in the
 top-level directory that recognizes the new system reliably, and
@@ -222,7 +223,7 @@ In order to install or upgrade Postfix:
   The INSTALL.sh script offers suggestions for pathnames that you
   can override, either by editing INSTALL.sh or by specifying your
   preferences interactively. INSTALL.sh stores your preferences in
-  the Postfix configuration directory in order to ease future installs.
+  /etc/postfix/install.cf in order to ease future installs.
 
 - Proceed to the section on how you wish to run Postfix on your
   particular machine:
index af68d4b3d9ca7827745aa14796f51cbaa13a07a0..a52671e13c3220f6c93cbcdc423076c7a0d5d960 100644 (file)
@@ -35,6 +35,8 @@ header_checks = regexp:/etc/postfix/header_checks
 #
 # REJECT the entire message is rejected.
 #
+# REJECT text.... The text is sent to the originator.
+#
 # IGNORE the body line is silently discarded.
 #
 # OK   Nothing happens. The message will still be rejected when some 
index 0a8ba1f84562c0b913d4de61958ddfa4207fe3fe..ed084a94275e6e1bd83468f8c504c59b78f515e8 100644 (file)
@@ -40,7 +40,7 @@ smtpd_banner = $myhostname ESMTP $mail_name
 #   maptype:mapname: look up client name, parent domains, client address,
 #      or networks obtained by stripping octets.
 #      Reject if result is REJECT or "[45]xx text"
-#      Permit result is OK or all numerical.
+#      Permit if result is OK or all numerical.
 #   reject_maps_rbl: reject if the reverse client network address
 #      is listed under $maps_rbl_domains.
 #   reject: reject the request. Place this at the end of a restriction.
@@ -154,7 +154,7 @@ mynetworks_style = subnet
 #   maptype:mapname: look up client name, parent domains, client address,
 #      or networks obtained by stripping octets.
 #      Reject if result is REJECT or "[45]xx text"
-#      Permit result is OK or all numerical.
+#      Permit if result is OK or all numerical.
 #   reject_maps_rbl: reject if the client is listed under $maps_rbl_domains.
 #   reject: reject the request. Place this at the end of a restriction.
 #   permit: permit the request. Place this at the end of a restriction.
@@ -191,7 +191,7 @@ smtpd_helo_required = no
 #   check_helo_access maptype:mapname
 #   maptype:mapname: look up HELO hostname or parent domains.
 #      Reject if result is REJECT or "[45]xx text"
-#      Permit result is OK or all numerical.
+#      Permit if result is OK or all numerical.
 #   check_client_access maptype:mapname: see smtpd_client_restrictions.
 #   reject: reject the request. Place this at the end of a restriction.
 #   permit: permit the request. Place this at the end of a restriction.
@@ -221,7 +221,7 @@ smtpd_helo_restrictions =
 #   check_sender_access maptype:mapname
 #   maptype:mapname: look up sender address, parent domain, or localpart@.
 #      Reject if result is REJECT or "[45]xx text"
-#      Permit result is OK or all numerical.
+#      Permit if result is OK or all numerical.
 #   check_client_access maptype:mapname: see smtpd_client_restrictions.
 #   check_helo_access maptype:mapname: see smtpd_helo_restrictions.
 #   reject_non_fqdn_hostname: reject HELO hostname that is not in FQDN form
@@ -289,7 +289,7 @@ smtpd_sender_restrictions =
 #   check_recipient_access maptype:mapname
 #   maptype:mapname: look up recipient address, parent domain, or localpart@.
 #      Reject if result is REJECT or "[45]xx text"
-#      Permit result is OK or all numerical.
+#      Permit if result is OK or all numerical.
 #   check_client_access maptype:mapname: see smtpd_client_restrictions.
 #   check_helo_access maptype:mapname: see smtpd_helo_restrictions.
 #   check_sender_access maptype:mapname: see smtpd_sender_restrictions.
diff --git a/postfix/errors_to b/postfix/errors_to
deleted file mode 100644 (file)
index e69de29..0000000
index 6e85b0dfe7bbe64353aa057185ee1d9bbd43362c..03a137dadc4c84aa85bec5513ea7baf4bfd44e5f 100644 (file)
@@ -227,7 +227,7 @@ static int bounce_verp_proto(char *service_name, VSTREAM *client, int flush)
     /*
      * Read and validate the client request.
      */
-    if (attr_scan(client, ATTR_FLAG_MISSING | ATTR_FLAG_EXTRA,
+    if (mail_command_server(client,
                  ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, &flags,
                  ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue_name,
                  ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, queue_id,
index 594f2bbdfb6fb45ba8b352ddbef41f73e7831469..acdde16fdf16582918ea519c05c54099c8228b9d 100644 (file)
@@ -234,7 +234,7 @@ static void cleanup_service(VSTREAM *src, char *unused_service, char **argv)
      * Finish this message, and report the result status to the client.
      */
     attr_print(src, ATTR_FLAG_NONE,
-              ATTR_TYPE_NUM, MAIL_ATTR_STATUS, cleanup_close(state),
+              ATTR_TYPE_NUM, MAIL_ATTR_STATUS, cleanup_flush(state),
               ATTR_TYPE_STR, MAIL_ATTR_WHY, state->reason ?
               state->reason : "",
               ATTR_TYPE_END);
index 955a014ef3b9aaaf04d5de2b166755bd02ec2097..09d700ed18ae0bd6e85680bf4abf3b6ac0319ebe 100644 (file)
@@ -104,7 +104,7 @@ extern void cleanup_state_free(CLEANUP_STATE *);
   */
 extern CLEANUP_STATE *cleanup_open(void);
 extern void cleanup_control(CLEANUP_STATE *, int);
-extern int cleanup_close(CLEANUP_STATE *);
+extern int cleanup_flush(CLEANUP_STATE *);
 extern void cleanup_free(CLEANUP_STATE *);
 extern void cleanup_all(void);
 extern void cleanup_pre_jail(char *, char **);
index 4728be59510cfa3b4b0bfa2c597dbe106bfd071d..f361f16e1b170287991702750bedc473a0bba459 100644 (file)
@@ -18,7 +18,7 @@
 /*     char    *buf;
 /*     int     len;
 /*
-/*     int     cleanup_close(state)
+/*     int     cleanup_flush(state)
 /*     CLEANUP_STATE *state;
 /*
 /*     int     cleanup_free(state)
@@ -30,7 +30,7 @@
 /*
 /*     cleanup_open() creates a new queue file and performs other
 /*     per-message initialization. The result is a handle that should be
-/*     given to the cleanup_control(), cleanup_record(), cleanup_close()
+/*     given to the cleanup_control(), cleanup_record(), cleanup_flush()
 /*     and cleanup_free() routines. The name of the queue file is in the
 /*     queue_id result structure member.
 /*
@@ -54,9 +54,9 @@
 /*     REC_TYPE_END.  In order to find out if a message is corrupted,
 /*     the caller is encouraged to test the CLEANUP_OUT_OK(state) macro.
 /*     The result is false when further message processing is futile.
-/*     In that case, it is safe to call cleanup_close() immediately.
+/*     In that case, it is safe to call cleanup_flush() immediately.
 /*
-/*     cleanup_close() closes a queue file. In case of any errors,
+/*     cleanup_flush() closes a queue file. In case of any errors,
 /*     the file is removed. The result value is non-zero in case of
 /*     problems. In some cases a human-readable text can be found in
 /*     the state->reason member. In all other cases, use cleanup_strerror()
@@ -170,9 +170,9 @@ void    cleanup_control(CLEANUP_STATE *state, int flags)
     }
 }
 
-/* cleanup_close - finish queue file */
+/* cleanup_flush - finish queue file */
 
-int     cleanup_close(CLEANUP_STATE *state)
+int     cleanup_flush(CLEANUP_STATE *state)
 {
     char   *junk;
     int     status;
@@ -261,7 +261,7 @@ int     cleanup_close(CLEANUP_STATE *state)
      * initializations at the beginning of cleanup_open().
      */
     if (msg_verbose)
-       msg_info("cleanup_close: status %d", state->errs);
+       msg_info("cleanup_flush: status %d", state->errs);
     status = state->errs;
     return (status);
 }
index 72127c180540a4409a01a191dfb436fee63ac5f6..d7176a434049d4e85ab25e69b17a38fb7b924114 100644 (file)
@@ -127,7 +127,7 @@ ARGV   *cleanup_map1n_internal(CLEANUP_STATE *state, char *addr,
                     * Allow an address to expand into itself once.
                     */
                    if (strcasecmp(saved_lhs, STR(state->temp1)) == 0)
-                       been_here_fixed(been_here, argv->argv[arg]);
+                       been_here_fixed(been_here, saved_lhs);
                }
                myfree(saved_lhs);
                argv_free(lookup);
index 147fef30d016564add2c2022c82f71b1ff8a25c5..bb283aa3cc6bb6bc166bee8df96ddefb9d637852 100644 (file)
@@ -60,7 +60,6 @@ void    cleanup_out_recipient(CLEANUP_STATE *state, char *recip)
 {
     ARGV   *argv;
     char  **cpp;
-    int     envelope_changed;
 
     if (cleanup_virtual_maps == 0) {
        if (been_here_fixed(state->dups, recip) == 0)
@@ -68,13 +67,9 @@ void    cleanup_out_recipient(CLEANUP_STATE *state, char *recip)
     } else {
        argv = cleanup_map1n_internal(state, recip, cleanup_virtual_maps,
                                  cleanup_ext_prop_mask & EXT_PROP_VIRTUAL);
-       envelope_changed = (argv->argc > 1 || strcmp(recip, argv->argv[0]));
        for (cpp = argv->argv; *cpp; cpp++)
-           if (been_here_fixed(state->dups, *cpp) == 0) {
-               if (envelope_changed)
-                   cleanup_out_string(state, REC_TYPE_ORCP, recip);
+           if (been_here_fixed(state->dups, *cpp) == 0)
                cleanup_out_string(state, REC_TYPE_RCPT, *cpp), state->rcpt_count++;
-           }
        argv_free(argv);
     }
 }
index 8cfb68a5eeb7653021c8aa3d2082ec7150d2e716..cf365545fe80253fe47449fc48914397261f22a3 100644 (file)
@@ -540,9 +540,12 @@ static void flush_service(VSTREAM *client_stream, char *unused_service,
      * All connection-management stuff is handled by the common code in
      * single_server.c.
      */
-    if (attr_scan(client_stream, ATTR_FLAG_MORE | ATTR_FLAG_EXTRA | ATTR_FLAG_MISSING,
-                 ATTR_TYPE_STR, MAIL_ATTR_REQ, request,
-                 ATTR_TYPE_END) == 1) {
+    if (peekfd(vstream_fileno(client_stream)) <= 2 ?
+       (vstring_get_null(request, client_stream) != VSTREAM_EOF) :
+       (attr_scan(client_stream,
+                  ATTR_FLAG_MORE | ATTR_FLAG_EXTRA | ATTR_FLAG_MISSING,
+                  ATTR_TYPE_STR, MAIL_ATTR_REQ, request,
+                  ATTR_TYPE_END) == 1)) {
        if (STREQ(STR(request), FLUSH_REQ_ADD)) {
            site = vstring_alloc(10);
            queue_id = vstring_alloc(10);
index d37440660e3991829449df0fef8c38f83f20ea54..139da45596870c4d94e20a50712a61ff94f68f51 100644 (file)
@@ -15,7 +15,7 @@
   * Version of this program.
   */
 #define VAR_MAIL_VERSION       "mail_version"
-#define DEF_MAIL_VERSION       "Snapshot-20011029"
+#define DEF_MAIL_VERSION       "Snapshot-20011030"
 extern char *var_mail_version;
 
 /* LICENSE
index 52ed8716c057befabc01b8b83a77dcbaa9a9ade1..122df98734c0b5ea7550014e4224bda43fcc547c 100644 (file)
@@ -236,9 +236,10 @@ int     post_mail_fclose(VSTREAM *cleanup)
     } else {
        rec_fputs(cleanup, REC_TYPE_XTRA, "");
        rec_fputs(cleanup, REC_TYPE_END, "");
-       if (vstream_fflush(cleanup) || attr_scan(cleanup, ATTR_FLAG_MISSING | ATTR_FLAG_EXTRA,
-                                  ATTR_TYPE_NUM, MAIL_ATTR_STATUS, &status,
-                                                ATTR_TYPE_END) != 1)
+       if (vstream_fflush(cleanup)
+           || attr_scan(cleanup, ATTR_FLAG_MISSING,
+                        ATTR_TYPE_NUM, MAIL_ATTR_STATUS, &status,
+                        ATTR_TYPE_END) != 1)
            status = CLEANUP_STAT_WRITE;
     }
     (void) vstream_fclose(cleanup);
index c8fcdc145f8acad41c90e814c314fb52dd5a9d67..e90b38edac8dced7ef901fa9b8e6c55ad5e042bf 100644 (file)
@@ -241,7 +241,7 @@ static int forward_send(FORWARD_INFO *info, DELIVER_ATTR attr, char *delivered)
      */
     if (status == 0)
        if (vstream_fflush(info->cleanup)
-           || attr_scan(info->cleanup, ATTR_FLAG_MISSING | ATTR_FLAG_EXTRA,
+           || attr_scan(info->cleanup, ATTR_FLAG_MISSING,
                         ATTR_TYPE_NUM, MAIL_ATTR_STATUS, &status,
                         ATTR_TYPE_END) != 1)
            status = 1;
index 4680747e0c0bb4cf5b67b651b81f2781af344765..209b94fbd3cfe8ca9e4dbc2d23cd6a1f42e8c972 100644 (file)
@@ -172,7 +172,7 @@ int     attr_vprint(VSTREAM *fp, int flags, va_list ap)
        case ATTR_TYPE_NUM_ARRAY:
            attr_name = va_arg(ap, char *);
            attr_print_str(fp, attr_name, strlen(attr_name));
-           ip_val = va_arg(ap, int *);
+           ip_val = va_arg(ap, unsigned int *);
            count_val = va_arg(ap, int);
            for (i = 0; i < count_val; i++) {
                VSTREAM_PUTC(':', fp);
index 51320bf5fe4a0288ff19b4f1fa73df455b9675fe..4098cfb44822150f742ff9cb860b7b610b3591dd 100644 (file)
@@ -345,7 +345,7 @@ int     attr_vscan(VSTREAM *fp, int flags, va_list ap)
                         STR(name_buf), VSTREAM_PATH(fp));
                return (conversions);
            }
-           number = va_arg(ap, int *);
+           number = va_arg(ap, unsigned int *);
            if ((ch = attr_scan_number(fp, number, str_buf,
                                       "attribute value")) < 0)
                return (conversions);