]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
snapshot-19990422
authorWietse Venema <wietse@porcupine.org>
Thu, 22 Apr 1999 05:00:00 +0000 (00:00 -0500)
committerWietse Venema <wietse@porcupine.org>
Thu, 17 Jan 2013 03:34:11 +0000 (22:34 -0500)
12 files changed:
postfix/HISTORY
postfix/RELEASE_NOTES
postfix/bounce/bounce_notify_service.c
postfix/conf/main.cf.default
postfix/global/mail_version.h
postfix/global/rewrite_clnt.c
postfix/local/mailbox.c
postfix/sendmail/sendmail.c
postfix/smtpd/smtpd.c
postfix/trivial-rewrite/rewrite.c
postfix/util/dict.c
postfix/util/vbuf_print.c

index c9e68603dc5bf6e677bfb44a5e4bfba6eef0f12c..27c6d153e9fe3d513192bc898734f56548f5dbda 100644 (file)
@@ -2615,35 +2615,39 @@ Apologies for any names omitted.
        $mydestination include files. This makes Postfix more
        compatible with sendmail.cw files. File: util/match_list.c.
 
-       Feature: specify "mydomain = domain.name" to have the local
-       domain name automagically appended to $myhostname. Files:
-       global/mail_params.c, postconf/postconf.c.
+       Feature: if your machines have short host names, specify
+       "mydomain = domain.name", and you no longer have to specify
+       "myhostname = host.domain.name". Files:  global/mail_params.c,
+       postconf/postconf.c.
 
-Future:
+19990420
 
-       Planned: must be able to list the same hash table in
-       virtual_maps and mydestination.
+       Cleanup: bounce mail when a mailbox goes over file quota,
+       instead of deferring delivery.  File:  local/mailbox.c.
 
-       Planned: delivered-to cache instead of table.
+19990421
 
-       Planned: hide internal loop info so that delivered-to is
-       no longer required.
-
-       Planned: DNS lookups for address canonicalization.
-
-       Planned: no more slow-down when qmgr reaches the end of
-       the in-memory recipient list while there's still more
-       recipients in the queue file.
+       Feature: auto-detection of changes to DB or DBM lookup
+       tables now includes the case where a file is unlinked.
+       Philip A.  Prindeville, Mirapoint, Inc., USA.  File:
+       util/dict.c.
 
-       Planned: pop pre-authentication by Joerg Henne.
+19990422
 
-       Planned: ident lookup by Jon Ribbens.
+       Robustness: Lotus mail sends MAIL FROM: <@> instead of <>.
+       Problem reported by Erik Toubro Nielsen, IFAD, Denmark.
+       Files:  trivial-rewrite/rewrite.c (@ becomes empty address)
+       and global/rewrite_clnt.c (allow empty response).
 
-       Planned: $logname, $home, $shell, $user, $sender expansions
-       in shell commands, mailbox_command, forward_path.
+       Bugfix: showq could segfault when writing to a broken pipe.
+       Problem reported by Bryan Fullerton, Canadian Broadcasting
+       Corporation. Files: util/vbuf_print.c.
 
-       Planned: forward_path, for example $home/.forward (default)
-       or /var/forward/$logname (for mail servers).
+       Cleanup: got rid of the "fatal: write error: Broken pipe"
+       message when mailq output is piped into a program that
+       terminates early.
 
-       Planned: control From_, Return-Path, Delivered-To and other
-       features with local delivery to mailbox or command.
+       Cleanup: bounce messages are multipart/mixed with the error
+       report as part of the first message segment, because users
+       had trouble extracting the delivery error report from the
+       attachment.
index 49cdc04121e6a43f36c82d8a8418cc54b9e5b868..0211dafb98e6614601f1561135dbd11bd482b5e9 100644 (file)
@@ -1,4 +1,4 @@
-Incompatible changes with snapshot-19990409:
+Incompatible changes with snapshot-19990422:
 ===========================================
 
 - If an address extension (+foo) matches a user's .forward+foo file
@@ -6,7 +6,7 @@ name, the +foo extension is no longer appended to recipient addresses
 listed in the .forward+foo file. This is more consistent with the
 way Postfix expands aliases.
 
-Major changes with snapshot-19990409:
+Major changes with snapshot-19990422:
 =====================================
 
 In addition to several little bugfixes, none related to security,
@@ -42,9 +42,9 @@ Macros: $user (login name), $home (home directory), $recipient_delimiter,
 $domain (recipient domain), and $extension (address extension).
 Initial code by Philip A.  Prindeville, Mirapoint, Inc., USA.
 
-- No more Postfix lockups on Solaris. The code no longer uses
-Solaris UNIX-domain sockets, because they are still broken,
-even with Solaris 7.
+- No more Postfix lockups on Solaris (knock on wood). The code no
+longer uses Solaris UNIX-domain sockets, because they are still
+broken, even with Solaris 7.
 
 - Workaround for the Solaris mailtool, which keeps an exclusive
 kernel lock on the mailbox while its window is not iconified (specify
@@ -58,8 +58,10 @@ sender and recipient mail addresses that distinguish between soft
 errors (always 450) and hard errors (unknown_address_reject_code,
 default 450).
 
-- MIME-encapsulated bounce messages as per RFC 1892. Initial
-implementation by Philip A.  Prindeville, Mirapoint, Inc., USA.
+- MIME-encapsulated bounce messages, making it easier to recover
+bounced mail. Initial implementation by Philip A.  Prindeville,
+Mirapoint, Inc., USA. Support for RFC 1894 (DSN) will have to wait
+until Postfix internals have been revised to support RFC 1893.
 
 - Separately configurable "postmaster" addresses for single bounces
 (bounce_notice_recipient), double bounces (2bounce_notice_recipient),
index 075896d51568f14a71692bd5c6dd92dd4dc4ad2c..5144bd8a6ae914247958ac3acbdaedb1a6772155 100644 (file)
@@ -121,8 +121,12 @@ static int bounce_header(VSTREAM *bounce, VSTRING *buf, const char *dest,
      * MIME header.
      */
     post_mail_fprintf(bounce, "MIME-Version: 1.0");
+#ifdef DSN
     post_mail_fprintf(bounce, "Content-Type: %s; report-type=%s;",
-                     "multipart/report", "plain");
+                     "multipart/report", "delivery-status");
+#else
+    post_mail_fprintf(bounce, "Content-Type: multipart/mixed;");
+#endif
     post_mail_fprintf(bounce, "\tboundary=\"%s\"", boundary);
     post_mail_fputs(bounce, "");
     post_mail_fputs(bounce, "This is a MIME-encapsulated message.");
@@ -211,10 +215,12 @@ static int bounce_diagnostics(char *service, VSTREAM *bounce, VSTRING *buf,
     /*
      * MIME header.
      */
+#ifdef DSN
     post_mail_fprintf(bounce, "--%s", boundary);
     post_mail_fprintf(bounce, "Content-Description: %s", "Delivery error report");
-    post_mail_fprintf(bounce, "Content-Type: %s", "text/plain");
+    post_mail_fprintf(bounce, "Content-Type: %s", "message/delivery-status");
     post_mail_fputs(bounce, "");
+#endif
 
     /*
      * If the bounce log cannot be found, do not raise a fatal run-time
index eb67f4ea0d7434402e5d320567b79ed73dba3c33..90ca4fb21b5d4f8c15cbf1c6cfeaf5b4b004a8fa 100644 (file)
@@ -61,7 +61,7 @@ luser_relay =
 mail_name = Postfix
 mail_owner = postfix
 mail_spool_directory = /var/mail
-mail_version = Snapshot-19990414
+mail_version = Snapshot-19990422
 mailbox_command = 
 mailbox_transport = 
 maps_rbl_domains = rbl.maps.vix.com
index 81a91b85632e5a33556afa1fab33aed8dfc2da5f..5ed04d7c79cf23bc803d78424844cd18975de87c 100644 (file)
@@ -15,7 +15,7 @@
   * Version of this program.
   */
 #define VAR_MAIL_VERSION       "mail_version"
-#define DEF_MAIL_VERSION       "Snapshot-19990414"
+#define DEF_MAIL_VERSION       "Snapshot-19990422"
 extern char *var_mail_version;
 
 /* LICENSE
index d6e383577a620bb7317f2c8ccffa5295142d6c70..a2545a78e7f7d465dc191eee4c79150c7e86d880 100644 (file)
@@ -111,9 +111,11 @@ VSTRING *rewrite_clnt(const char *rule, const char *addr, VSTRING *result)
            if (msg_verbose)
                msg_info("rewrite_clnt: %s: %s -> %s",
                         rule, addr, vstring_str(result));
+#if 0
            if (addr[0] != 0 && STR(result)[0] == 0)
                msg_warn("%s: null result for: <%s>", myname, addr);
            else
+#endif
                return (result);
        }
        sleep(10);                              /* XXX make configurable */
index 8888813d2211e9992385f11a384ae4912fc46bb7..9ac2489df32a69279e5bb3146f77ffeb883d7a07 100644 (file)
@@ -50,6 +50,7 @@
 #include <fcntl.h>
 #include <string.h>
 #include <unistd.h>
+#include <errno.h>
 
 /* Utility library. */
 
 #include <mail_params.h>
 #include <deliver_pass.h>
 
+#ifndef EDQUOT
+#define EDQUOT EFBIG
+#endif
+
 /* Application-specific. */
 
 #include "local.h"
@@ -205,8 +210,9 @@ static int deliver_mailbox_file(LOCAL_STATE state, USER_ATTR usr_attr)
     set_eugid(var_owner_uid, var_owner_gid);
 
     if (status)
-       defer_append(BOUNCE_FLAG_KEEP, BOUNCE_ATTR(state.msg_attr),
-                "cannot append to file %s: %s", mailbox, vstring_str(why));
+       status = (errno == EDQUOT ? bounce_append : defer_append)
+           (BOUNCE_FLAG_KEEP, BOUNCE_ATTR(state.msg_attr),
+            "cannot append to file %s: %s", mailbox, vstring_str(why));
     else
        sent(SENT_ATTR(state.msg_attr), "mailbox");
     myfree(mailbox);
index 33736e36fb39e51bf5a2ce881699fc244740ed3c..d15701c769df45a59bd25a625e3177ca9b9b8458 100644 (file)
@@ -458,8 +458,10 @@ static void show_queue(void)
     int     n;
 
     /*
-     * Connect to the show queue service.
+     * Connect to the show queue service. Terminate silently when piping into
+     * a program that terminates early.
      */
+    signal(SIGPIPE, SIG_DFL);
     if ((showq = mail_connect(MAIL_CLASS_PUBLIC, MAIL_SERVICE_SHOWQ, BLOCKING)) != 0) {
        while ((n = vstream_fread(showq, buf, sizeof(buf))) > 0)
            if (vstream_fwrite(VSTREAM_OUT, buf, n) != n)
@@ -739,7 +741,7 @@ int     main(int argc, char **argv)
        msg_fatal("-t can be used only in delivery mode");
 
     if (extract_recipients && argv[OPTIND])
-       msg_fatal("cannot delete recipients with -t");
+       msg_fatal("cannot handle command-line recipients with -t");
 
     /*
      * Start processing. Some modes are implemented internally (enqueue
index f7482e4f798d7399bc66ec8e484b06580a6879cd..6b88e9e85395eb8ae90ddacbacc869314293e395 100644 (file)
@@ -637,7 +637,7 @@ static int data_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *unused_argv)
      * whitespace, so that it won't be considered as being part of our own
      * Received: header. What an ugly Kluge.
      */
-    if (vstream_ferror(state->cleanup))
+    if (vstream_fflush(state->cleanup))
        state->err = CLEANUP_STAT_WRITE;
 
     for (prev_rec_type = 0; /* void */ ; prev_rec_type = curr_rec_type) {
index b2dc90587f0c65bffaf39efeb12a41913892160d..93ec33f3e419f124387948f52e36e49a732e9428 100644 (file)
@@ -104,6 +104,16 @@ void    rewrite_tree(char *unused_ruleset, TOK822 *tree)
        && VSTRING_LEN(tree->tail->vstr) == 0)
        return;
 
+    /*
+     * Treat a lone @ as if it were an empty address.
+     */
+    if (tree->head == tree->tail
+       && tree->tail->type == '@') {
+       tok822_free_tree(tok822_sub_keep_before(tree, tree->tail));
+       tok822_sub_append(tree, tok822_alloc(TOK822_QSTRING, ""));
+       return;
+    }
+
     /*
      * Strip source route.
      */
index f4931aec90546dc0f6172d4f84bf6e5260d989fc..899c6c50b6d61485efd5837ce4db02ecc4915588 100644 (file)
 /*     Application context from the caller.
 /* .PP
 /*     dict_changed() returns non-zero when any dictionary needs to
-/*     be re-opened because it has changed.
+/*     be re-opened because it has changed or because it was unlinked.
 /*
 /*     dict_load_file() reads name-value entries from the named file.
 /*     Lines that begin with whitespace are concatenated to the preceding
@@ -471,7 +471,7 @@ int     dict_changed(void)
            msg_warn("%s: table %s: null time stamp", myname, h->key);
        if (fstat(dict->fd, &st) < 0)
            msg_fatal("%s: fstat: %m", myname);
-       status = (st.st_mtime != dict->mtime);
+       status = (st.st_mtime != dict->mtime || st.st_nlink == 0);
     }
     myfree((char *) ht_info_list);
     return (status);
index a820e42b6ec0660166177a7e534d3c846fa0e8d2..216e2e2f972a20307db643519a7873ead6f379bf 100644 (file)
@@ -189,7 +189,7 @@ VBUF   *vbuf_print(VBUF *bp, const char *format, va_list ap)
                s = va_arg(ap, char *);
                if (prec > 0 || (width > 0 && width > strlen(s))) {
                    if (VBUF_SPACE(bp, (width > prec ? width : prec) + INT_SPACE))
-                       break;
+                       return (bp);
                    sprintf((char *) bp->ptr, vstring_str(fmt), s);
                    VBUF_SKIP(bp);
                } else {
@@ -203,7 +203,7 @@ VBUF   *vbuf_print(VBUF *bp, const char *format, va_list ap)
            case 'x':
            case 'X':
                if (VBUF_SPACE(bp, (width > prec ? width : prec) + INT_SPACE))
-                   break;
+                   return (bp);
                if (long_flag)
                    sprintf((char *) bp->ptr, vstring_str(fmt), va_arg(ap, long));
                else
@@ -214,7 +214,7 @@ VBUF   *vbuf_print(VBUF *bp, const char *format, va_list ap)
            case 'f':
            case 'g':
                if (VBUF_SPACE(bp, (width > prec ? width : prec) + DBL_SPACE))
-                   break;
+                   return (bp);
                sprintf((char *) bp->ptr, vstring_str(fmt), va_arg(ap, double));
                VBUF_SKIP(bp);
                break;
@@ -223,7 +223,7 @@ VBUF   *vbuf_print(VBUF *bp, const char *format, va_list ap)
                break;
            case 'p':
                if (VBUF_SPACE(bp, (width > prec ? width : prec) + PTR_SPACE))
-                   break;
+                   return (bp);
                sprintf((char *) bp->ptr, vstring_str(fmt), va_arg(ap, char *));
                VBUF_SKIP(bp);
                break;