]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.0.16-20030921
authorWietse Venema <wietse@porcupine.org>
Sun, 21 Sep 2003 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:29:09 +0000 (06:29 +0000)
12 files changed:
postfix/HISTORY
postfix/html/postkick.1.html
postfix/html/virtual.8.html
postfix/man/man1/postkick.1
postfix/src/bounce/bounce_notify_util.c
postfix/src/global/abounce.c
postfix/src/global/defer.c
postfix/src/global/mail_version.h
postfix/src/global/trace.c
postfix/src/postkick/postkick.c
postfix/src/smtpd/smtpd_check.c
postfix/src/virtual/virtual.c

index 3991a45cdbfc2d804e5163d3603e6620848e3be0..da621377650f5e87a778d55f6839719150a8e37a 100644 (file)
@@ -8605,15 +8605,25 @@ Apologies for any names omitted.
 
 20030920
 
-       Bugfix: LDAP client update by by Victor Duchovni, Morgan
-       Stanley.  Files: README_FILES/LDAP_README, util/dict_ldap.c.
+       Bugfix: the 20030917 LDAP connection sharing code introduced
+       a compilation problem with non-OpenLDAP implementations.
+       Fix by Liviu Daia. File: util/dict_ldap.c
+
+       Compatibility: the LDAP server_host parameter now supports
+       all the usual Postfix list element delimiters. Some LDAP
+       libraries support just SPACE, others SPACE and ",". Postfix
+       now normalizes the host list into a space separated format.
+       This is less surprising to Postfix users used to the full
+       range of delimeters in other contexts. Implemented by Liviu
+       Daia. File: util/dict_ldap.c
 
        Bugfix: after returning too old mail, the bounce daemon
-       now deletes recipients from the original queue file, to
-       avoid repeated bounce notifications when the queue manager
-       is restarted. Files:  bounce/*.[hc], global/bounce_log.[hc],
-       global/{bounce,defer}.[hc] and everything that invokes
-       these routines including queue manager and delivery agents.
+       now locks the original queue file and deletes deferred
+       recipients, to avoid repeated bounce notifications when
+       the queue manager is restarted. Files:  bounce/*.[hc],
+       global/bounce_log.[hc], global/{bounce,defer}.[hc] and
+       everything that invokes these routines including queue
+       manager and delivery agents.
 
 Open problems:
 
index 9e0663f78a004c89b63f25b264f9aeaf86c7ca74..b86c1a346d57efa0640b83e61f3478bb9a90c91a 100644 (file)
@@ -58,12 +58,16 @@ POSTKICK(1)                                           POSTKICK(1)
               Location of the Postfix queue, and of the local IPC
               communication endpoints.
 
+       <b>application_event_drain_time</b>
+              How long the program waits for the  trigger  to  be
+              accepted.
+
 <b>SEE ALSO</b>
        <a href="qmgr.8.html">qmgr(8)</a> queue manager trigger protocol
        <a href="pickup.8.html">pickup(8)</a> local pickup daemon
 
 <b>LICENSE</b>
-       The Secure Mailer license must be  distributed  with  this
+       The  Secure  Mailer  license must be distributed with this
        software.
 
 <b>AUTHOR(S)</b>
index b074db1e44afb54420e05671649f2968739f6b16..16fdda0760510ae41cf412f66769cb485f393678 100644 (file)
@@ -1,4 +1,4 @@
-<html> <head> </head> <body> <pre>
+<html> <body> <pre>
 VIRTUAL(8)                                             VIRTUAL(8)
 
 <b>NAME</b>
index 67d647e91b005abda63750a221d8c66fcc85f6f6..4885692a3bae54eee0f174c99bcd183a2533dbc3 100644 (file)
@@ -61,6 +61,8 @@ and for default values.
 .IP \fBqueue_directory\fR
 Location of the Postfix queue, and of the local IPC communication
 endpoints.
+.IP \fBapplication_event_drain_time\fR
+How long the program waits for the trigger to be accepted.
 .SH SEE ALSO
 .na
 .nf
index 29f06bc201d68b5201ac2e2bbd2d612a29e4ffd2..3457971c5571c492918d2de84dbead317a7c3e24 100644 (file)
 #include <line_wrap.h>
 #include <stringops.h>
 #include <xtext.h>
+#include <myflock.h>
 
 /* Global library. */
 
@@ -256,7 +257,7 @@ static BOUNCE_INFO *bounce_mail_alloc(const char *service,
      * backoff.
      */
     if ((bounce_info->orig_fp = mail_queue_open(queue_name, queue_id,
-                                               O_RDONLY, 0)) == 0
+                                               O_RDWR, 0)) == 0
        && errno != ENOENT)
        msg_fatal("open %s %s: %m", service, queue_id);
 
@@ -264,8 +265,17 @@ static BOUNCE_INFO *bounce_mail_alloc(const char *service,
      * Skip over the original message envelope records. If the envelope is
      * corrupted just send whatever we can (remember this is a best effort,
      * it does not have to be perfect).
+     * 
+     * Lock the file for shared use, so that queue manager leaves it alone after
+     * restarting.
      */
+#define DELIVER_LOCK_MODE (MYFLOCK_OP_SHARED | MYFLOCK_OP_NOWAIT)
+
     if (bounce_info->orig_fp != 0) {
+       if (myflock(vstream_fileno(bounce_info->orig_fp), INTERNAL_LOCK,
+                   DELIVER_LOCK_MODE) < 0)
+           msg_fatal("cannot get shared lock on %s: %m",
+                     VSTREAM_PATH(bounce_info->orig_fp));
        while ((rec_type = rec_get(bounce_info->orig_fp,
                                   bounce_info->buf, 0)) > 0) {
            if (rec_type == REC_TYPE_TIME && bounce_info->arrival_time == 0) {
@@ -308,7 +318,7 @@ BOUNCE_INFO *bounce_mail_init(const char *service,
      * job. But if the system IS running out of resources, raise a fatal
      * run-time error and force a backoff.
      */
-    if ((log_handle = bounce_log_open(service, queue_id, O_RDWR, 0)) == 0
+    if ((log_handle = bounce_log_open(service, queue_id, O_RDONLY, 0)) == 0
        && errno != ENOENT)
        msg_fatal("open %s %s: %m", service, queue_id);
     bounce_info = bounce_mail_alloc(service, queue_name, queue_id,
@@ -544,7 +554,7 @@ int     bounce_diagnostic_log(VSTREAM *bounce, BOUNCE_INFO *bounce_info)
      */
     if (bounce_info->log_handle == 0
        || bounce_log_rewind(bounce_info->log_handle)) {
-       post_mail_fputs(bounce, "\t--- Delivery error report unavailable ---");
+       post_mail_fputs(bounce, "\t--- Delivery report unavailable ---");
     } else {
        while (bounce_log_read(bounce_info->log_handle) != 0)
            if (bounce_recipient_log(bounce, bounce_info) != 0)
index 3bb158889ce8edb1b36475e7f204f09aba156471..1cb1c8b08b9b8e80e806cd61dbb66bc9bd42526c 100644 (file)
@@ -6,7 +6,8 @@
 /* SYNOPSIS
 /*     #include <abounce.h>
 /*
-/*     void    abounce_flush(flags, queue, id, encoding, sender, callback, context)
+/*     void    abounce_flush(flags, queue, id, encoding, sender,
+/*                             callback, context)
 /*     int     flags;
 /*     const char *queue;
 /*     const char *id;
@@ -15,7 +16,8 @@
 /*     void    (*callback)(int status, char *context);
 /*     char    *context;
 /*
-/*     void    abounce_flush_verp(flags, queue, id, encoding, sender, verp, callback, context)
+/*     void    abounce_flush_verp(flags, queue, id, encoding,
+/*                             sender, verp, callback, context)
 /*     int     flags;
 /*     const char *queue;
 /*     const char *id;
@@ -25,7 +27,8 @@
 /*     void    (*callback)(int status, char *context);
 /*     char    *context;
 /*
-/*     void    adefer_flush(flags, queue, id, encoding, sender, callback, context)
+/*     void    adefer_flush(flags, queue, id, encoding, sender,
+/*                             callback, context)
 /*     int     flags;
 /*     const char *queue;
 /*     const char *id;
@@ -34,7 +37,8 @@
 /*     void    (*callback)(int status, char *context);
 /*     char    *context;
 /*
-/*     void    adefer_flush_verp(flags, queue, id, encoding, sender, verp, callback, context)
+/*     void    adefer_flush_verp(flags, queue, id, encoding,
+/*                             sender, verp, callback, context)
 /*     int     flags;
 /*     const char *queue;
 /*     const char *id;
@@ -44,7 +48,8 @@
 /*     void    (*callback)(int status, char *context);
 /*     char    *context;
 /*
-/*     void    adefer_warn(flags, queue, id, encoding, sender, callback, context)
+/*     void    adefer_warn(flags, queue, id, encoding, sender,
+/*                             callback, context)
 /*     int     flags;
 /*     const char *queue;
 /*     const char *id;
@@ -67,6 +72,8 @@
 /*     adefer_flush() bounces the specified message to
 /*     the specified sender, including the defer log that was
 /*     built with defer_append().
+/*     adefer_flush() requests that the deferred recipients are deleted
+/*     from the original queue file.
 /*
 /*     adefer_flush_verp() is like adefer_flush() but sends
 /*     one VERP style notification per undeliverable recipient.
@@ -244,6 +251,7 @@ void    adefer_flush_verp(int flags, const char *queue, const char *id,
                                  const char *verp, ABOUNCE_FN callback,
                                  char *context)
 {
+    flags |= BOUNCE_FLAG_DELRCPT;
     abounce_request_verp(MAIL_CLASS_PRIVATE, var_defer_service,
                         BOUNCE_CMD_VERP, flags, queue, id, encoding,
                         sender, verp, callback, context);
@@ -302,6 +310,7 @@ void    adefer_flush(int flags, const char *queue, const char *id,
                             const char *encoding, const char *sender,
                             ABOUNCE_FN callback, char *context)
 {
+    flags |= BOUNCE_FLAG_DELRCPT;
     abounce_request(MAIL_CLASS_PRIVATE, var_defer_service, BOUNCE_CMD_FLUSH,
                    flags, queue, id, encoding, sender, callback, context);
 }
index 619a1d44178634aafd3bcaa099b5891862d8741d..5954ab215bb7543200b67a14b93a468f1a60c448 100644 (file)
@@ -59,6 +59,8 @@
 /*
 /*     defer_flush() bounces the specified message to the specified
 /*     sender, including the defer log that was built with defer_append().
+/*     defer_flush() requests that the deferred recipients are deleted
+/*     from the original queue file.
 /*     The result is zero in case of success, non-zero otherwise.
 /*
 /*     defer_warn() sends a warning message that the mail in question has
index fb846d6fb97b42d51377b4501bdca4e527dd4c4d..c79c8fa985dd4315d76f629281f2c16d36294964 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change the patchlevel and the release date. Snapshots change the
   * release date only, unless they include the same bugfix as a patch release.
   */
-#define MAIL_RELEASE_DATE      "20030920"
+#define MAIL_RELEASE_DATE      "20030921"
 
 #define VAR_MAIL_VERSION       "mail_version"
 #define DEF_MAIL_VERSION       "2.0.16-" MAIL_RELEASE_DATE
index c517a4beebb3222dbae7d3114e7df7f9898bfc1c..3ee21dbd099fddad9cabedf511ea29fdab2fb7a7 100644 (file)
@@ -163,6 +163,7 @@ int     vtrace_append(int flags, const char *queue_id,
                            ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, queue_id,
                            ATTR_TYPE_STR, MAIL_ATTR_ORCPT, orig_rcpt,
                            ATTR_TYPE_STR, MAIL_ATTR_RECIP, recipient,
+                           ATTR_TYPE_LONG, MAIL_ATTR_OFFSET, (long) 0,
                            ATTR_TYPE_STR, MAIL_ATTR_STATUS, dsn_code,
                            ATTR_TYPE_STR, MAIL_ATTR_ACTION, dsn_action,
                            ATTR_TYPE_STR, MAIL_ATTR_WHY, vstring_str(why),
index e632568832723ab4889359ba3ad7ffe55d5a9e4a..4e5d7a0d7e9509eb2600317c757ece7c103b2554 100644 (file)
@@ -49,6 +49,8 @@
 /* .IP \fBqueue_directory\fR
 /*     Location of the Postfix queue, and of the local IPC communication
 /*     endpoints.
+/* .IP \fBapplication_event_drain_time\fR
+/*     How long the program waits for the trigger to be accepted.
 /* SEE ALSO
 /*     qmgr(8) queue manager trigger protocol
 /*     pickup(8) local pickup daemon
index 1de12473019e1297bc518d1a0b8758941ca103f6..96bbe1ebf6bbad2d62ce6c9fe455b9d5cce463f0 100644 (file)
@@ -2238,8 +2238,8 @@ static int check_server_access(SMTPD_STATE *state, const char *table,
        }
     }
     if (dns_status != DNS_OK) {
-       msg_warn("Unable to look up %s host for %s", dns_strtype(type),
-                domain && domain[1] ? domain : name);
+       msg_warn("Unable to look up %s host for %s: %s", dns_strtype(type),
+                domain && domain[1] ? domain : name, dns_strerror(h_errno));
        return (SMTPD_CHECK_DUNNO);
     }
 
@@ -2253,9 +2253,9 @@ static int check_server_access(SMTPD_STATE *state, const char *table,
      */
     for (server = server_list; server != 0; server = server->next) {
        if ((hp = gethostbyname((char *) server->data)) == 0) {
-           msg_warn("Unable to look up %s host %s for %s %s",
+           msg_warn("Unable to look up %s host %s for %s %s: %s",
                     dns_strtype(type), (char *) server->data,
-                    reply_class, reply_name);
+                    reply_class, reply_name, dns_strerror(h_errno));
            continue;
        }
        if (hp->h_addrtype != AF_INET || hp->h_length != sizeof(addr)) {
index ab3e6a5c6dafb4000e35be5422fb3945b1ba21cb..224fd3c5d322cface35da9d7ef302514cd3a0434 100644 (file)
@@ -384,6 +384,7 @@ static int local_deliver(DELIVER_REQUEST *rqst, char *service)
     for (msg_stat = 0, rcpt = rqst->rcpt_list.info; rcpt < rcpt_end; rcpt++) {
        state.msg_attr.orig_rcpt = rcpt->orig_addr;
        state.msg_attr.recipient = rcpt->address;
+       state.msg_attr.rcpt_offset = rcpt->offset;
        rcpt_stat = deliver_recipient(state, usr_attr);
        if (rcpt_stat == 0)
            deliver_completed(state.msg_attr.fp, rcpt->offset);