]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
snapshot-19991207
authorWietse Venema <wietse@porcupine.org>
Tue, 7 Dec 1999 05:00:00 +0000 (00:00 -0500)
committerWietse Venema <wietse@porcupine.org>
Thu, 17 Jan 2013 23:09:47 +0000 (18:09 -0500)
13 files changed:
postfix/HISTORY
postfix/INSTALL
postfix/RELEASE_NOTES
postfix/conf/main.cf
postfix/conf/sample-smtpd.cf
postfix/global/mail_version.h
postfix/html/faq.html
postfix/html/uce.html
postfix/qmgr/qmgr_active.c
postfix/qmgr/qmgr_entry.c
postfix/qmgr/qmgr_message.c
postfix/smtpd/smtpd.c
postfix/util/dict_ldap.c

index 5d36a14ab77c997334968b3a9343e45ca64500cf..d6b13adaa2d2664860dc447d6b952ba023a7a7d4 100644 (file)
@@ -3307,5 +3307,25 @@ Apologies for any names omitted.
 
 19991126
 
-       Bugfix: TXT records now have string lengths before text
+       Bugfix: DNS TXT records now have string lengths before text
        (Mark Martinec @ nsc.ijs.si).
+
+19991127
+
+       Update: the LDAP client code now supports escapes as per
+       RFC2254 (John Hensley).
+
+19991207
+
+       Performance: the queue manager now frees in-memory recipients
+       as soon as a message is delivered to one destination, rather
+       than waiting until all in-memory recipients of that message
+       have been tried. This means that one message with many
+       recipients no longer stops other mail from being delivered.
+       Patch by Patrik Rak @ ein.cz. Files: qmgr/qmgr_entry.c,
+       qmgr/qmgr_message.c.
+
+       Performance: when delivering a huge list of recipients,
+       the queue manager now reads new recipients from queue file
+       before delivery concurrency starts dropping.  Files:
+       qmgr/qmgr_entry.c, qmgr/qmgr_message.c.
index a54d68f3f6ff856d2aeaa8d470ae5c5331e9a5ea..99f3df5b69c512b57d7aa9b8f8b99c6589780485 100644 (file)
@@ -66,6 +66,8 @@ If your system is supported, it is one of
     Linux RedHat 5.x
     Linux RedHat 6.x
     Linux Slackware 3.5
+    Linux Slackware 4.0
+    Linux Slackware 7.0
     Linux SuSE 5.x
     Linux SuSE 6.x
     Mac OS X server
index a63b720763bac42962e3e6205f4819cba352e3a1..e4449762c627f6109a58e03bab08705f9faabd46 100644 (file)
@@ -1,4 +1,4 @@
-Incompatible changes with snapshot 19991123
+Incompatible changes with snapshot 19991127
 ===========================================
 
 - In an SMTPD access map, an all-numeric right-hand side now means
@@ -18,7 +18,7 @@ $mydestination domains matches a transport specification, you also
 need to add a "domain.name local:" entry in your transport_maps.
 See the html/faq.html sections for firewalls and intranets.
 
-Major changes with snapshot 19991123
+Major changes with snapshot 19991127
 ====================================
 
 - It is now relatively safe to configure 550 status codes for the
index 57b7f0a6278b34fd971e8321d1c092611d9562a7..869b2bbcb93821cc6f2dedffab19738b164d30f4 100644 (file)
@@ -108,8 +108,8 @@ mail_owner = postfix
 # a name matches a lookup key.  Continue long lines by starting the
 # next line with whitespace.
 #
-# DO NOT LIST VIRTUAL DOMAINS HERE. INSTEAD LIST $VIRTUAL_MAPS AS AN
-# AUTHORIZED DESTINATION IN RELAY_DOMAINS.
+# DO NOT LIST VIRTUAL DOMAINS HERE. LIST THEM IN THE VIRTUAL FILE
+# INSTEAD. BE SURE TO READ THE ENTIRE VIRTUAL MANUAL PAGE.
 #
 #mydestination = $myhostname, localhost.$mydomain
 #mydestination = $myhostname, localhost.$mydomain $mydomain
index b5551e6348fab7e849c05d477581cdae613d7f0f..db6f35f692b864844a1d0f25d75726a1eb448181 100644 (file)
@@ -180,8 +180,8 @@ smtpd_sender_restrictions =
 # recipient addresses that SMTP clients can send in RCPT TO commands.
 # 
 # The default is to permit any destination from clients that match
-# $mynetworks, and to otherwise permit only mail from or to domains
-# listed in $relay_domains.
+# $mynetworks, and to otherwise permit only mail from clients or to
+# domains that match $relay_domains or a subdomain thereof.
 #
 # The following restrictions are available:
 #
index 47e35bddfb67ef2b95f9222d67341091af62cf4b..5c873b6450931651285400d319c1ee8fceac1e1c 100644 (file)
@@ -15,7 +15,7 @@
   * Version of this program.
   */
 #define VAR_MAIL_VERSION       "mail_version"
-#define DEF_MAIL_VERSION       "Snapshot-19991123"
+#define DEF_MAIL_VERSION       "Snapshot-19991207"
 extern char *var_mail_version;
 
 /* LICENSE
index 349a64f22c6b927261f414e453044d2fd6023868..f938652fdd681c8ae9e383de145993e4390ecb3b 100644 (file)
@@ -186,8 +186,9 @@ href="transport.5.html">transport</a> table lookups.
 
 <p>
 
-Do not omit the entry that routes mail for the local machine to
-the local delivery agent.
+Do not omit the entry that routes mail for <i>thishost.my.domain</i>
+to the local delivery agent, or else mail for the local machine will
+go into a loop.
 
 <p>
 
@@ -257,12 +258,6 @@ configuration change.
 
 </ul>
 
-<p>
-
-Unfortunately, the solution cannot use the transport table, because
-that table is ignored for destinations that match <b>$mydestination</b>.
-That's an implementation error, and it will be removed.
-
 <hr>
 
 <a name="dialup"><h2>Running Postfix on a dialup machine</h2></a>
index 7b74063db7c573baa3f44cbc2932a5e14fd8bed3..58db0ae5fc8af245ebfba6b1cab6ca7a415bebf3 100644 (file)
@@ -537,8 +537,9 @@ reject_unauth_destination</b>
 
 <dt> <b>check_relay_domains</b> <dd> Permit the request when the
 client hostname matches <a href="#relay_domains">$relay_domains</a>,
-or when the resolved destination address matches the the local
-machine or <a href="#relay_domains"> $relay_domains</a>, otherwise
+or when the resolved destination address matches <a
+href="basic.html#mydestination">$mydestination</a>, the machine IP
+addresses, or <a href="#relay_domains"> $relay_domains</a>, otherwise
 reject the request.  The <b>relay_domains_reject_code</b> parameter
 specifies the response code for rejected requests (default:
 <b>554</b>).
@@ -549,7 +550,8 @@ specifies the response code for rejected requests (default:
 
 <dt> <b>permit_auth_destination</b> <dd> Ignore the client hostname.
 Permit the request when the resolved destination address matches
-the local machine or <a href="#relay_domains"> $relay_domains</a>.
+the <a href="basic.html#mydestination">$mydestination</a>, the
+machine IP addresses, or <a href="#relay_domains"> $relay_domains</a>.
 
 <p>
 
@@ -557,10 +559,10 @@ the local machine or <a href="#relay_domains"> $relay_domains</a>.
 
 <dt> <b>reject_unauth_destination</b> <dd> Ignore the client
 hostname.  Reject the request when the resolved destination address
-does not match the local machine or <a href="#relay_domains">
-$relay_domains</a>.  The <b>relay_domains_reject_code</b> parameter
-specifies the response code for rejected requests (default:
-<b>554</b>).
+does not match <a href="basic.html#mydestination">$mydestination</a>,
+the machine IP addresses, or <a href="#relay_domains"> $relay_domains</a>.
+The <b>relay_domains_reject_code</b> parameter specifies the response
+code for rejected requests (default:  <b>554</b>).
 
 <p>
 
index 5fe689029dcc07cda833fab82e9426005128c4d2..9ba5a7dab5402205f24f2c8e19fc2c91d4fd4147 100644 (file)
@@ -19,7 +19,7 @@
 /*     of messages that the queue manager is actually working on.
 /*     The active queue is limited in size. Messages are drained
 /*     from the active queue by allocating a delivery process and
-/*     by delivering mail via that process.  Message leak into the
+/*     by delivering mail via that process.  Messages leak into the
 /*     active queue only when the active queue is small enough.
 /*     Damaged message files are saved to the "corrupt" directory.
 /*
index 4c7c65e213a65d66f402d9fe7d2778d92c428926..f471e51fd709c19346db8f1c648b55a86f3dab9f 100644 (file)
@@ -135,6 +135,14 @@ void    qmgr_entry_done(QMGR_ENTRY *entry, int which)
     } else {
        msg_panic("qmgr_entry_done: bad queue spec: %d", which);
     }
+
+    /*
+     * Free the recipient list and decrease in-core recipient count
+     * accordingly.
+     */
+    qmgr_recipient_count -= entry->rcpt_list.len;
+    qmgr_rcpt_list_free(&entry->rcpt_list);
+
     myfree((char *) entry);
 
     /*
@@ -152,11 +160,17 @@ void    qmgr_entry_done(QMGR_ENTRY *entry, int which)
 
     /*
      * Update the in-core message reference count. When the in-core message
-     * structure has no more references, dispose of the message.
+     * structure has no more references, dispose of the message. When the
+     * in-core recipient count falls below some threshold and this message
+     * has more recipients, read them from disk before concurrency starts to
+     * drop.
      */
     message->refcount--;
     if (message->refcount == 0)
        qmgr_active_done(message);
+    else if (message->rcpt_offset > 0
+            && qmgr_recipient_count < var_qmgr_rcpt_limit / 2)
+       qmgr_message_realloc(message);
 }
 
 /* qmgr_entry_create - create queue todo entry */
@@ -174,8 +188,7 @@ QMGR_ENTRY *qmgr_entry_create(QMGR_QUEUE *queue, QMGR_MESSAGE *message)
     entry = (QMGR_ENTRY *) mymalloc(sizeof(QMGR_ENTRY));
     entry->stream = 0;
     entry->message = message;
-    entry->rcpt_list.len = 0;
-    entry->rcpt_list.info = 0;
+    qmgr_rcpt_list_init(&entry->rcpt_list);
     message->refcount++;
     entry->queue = queue;
     QMGR_LIST_APPEND(queue->todo, entry);
index a6a89b4303059431bbbfa3cd72c026fe6e4ace2f..0703913f90cfec4d3bd9852b9684128917f1a347 100644 (file)
@@ -194,6 +194,7 @@ static int qmgr_message_read(QMGR_MESSAGE *message)
     long    extra_offset;
     int     rec_type;
     long    curr_offset;
+    long    save_offset = message->rcpt_offset;        /* save a flag */
     char   *start;
     struct stat st;
 
@@ -207,12 +208,11 @@ static int qmgr_message_read(QMGR_MESSAGE *message)
      * already looked at, and reset the in-core recipient address list.
      */
     if (message->rcpt_offset) {
+       if (message->rcpt_list.len)
+           msg_panic("%s: recipient list not empty on recipient reload", message->queue_id);
        if (vstream_fseek(message->fp, message->rcpt_offset, SEEK_SET) < 0)
            msg_fatal("seek file %s: %m", VSTREAM_PATH(message->fp));
        message->rcpt_offset = 0;
-       qmgr_recipient_count -= message->rcpt_list.len;
-       qmgr_rcpt_list_free(&message->rcpt_list);
-       qmgr_rcpt_list_init(&message->rcpt_list);
     }
 
     /*
@@ -282,8 +282,6 @@ static int qmgr_message_read(QMGR_MESSAGE *message)
        }
     } while (rec_type > 0 && rec_type != REC_TYPE_END);
 
-    qmgr_recipient_count += message->rcpt_list.len;
-
     /*
      * If there is no size record, use the queue file size instead.
      */
@@ -319,6 +317,7 @@ static int qmgr_message_read(QMGR_MESSAGE *message)
        msg_warn("%s: envelope records out of order", message->queue_id);
        return (-1);
     } else {
+       message->rcpt_offset = save_offset;     /* restore flag */
        return (0);
     }
 }
@@ -620,10 +619,11 @@ static void qmgr_message_assign(QMGR_MESSAGE *message)
     /*
      * Try to bundle as many recipients in a delivery request as we can. When
      * the recipient resolves to the same site and transport as the previous
-     * recipient, do not create a new queue entry, just bump the count of
-     * recipients for the existing queue entry. All this provided that we do
-     * not exceed the transport-specific limit on the number of recipients
-     * per transaction. Skip recipients with a dead transport or destination.
+     * recipient, do not create a new queue entry, just move that recipient
+     * to the recipient list of the existing queue entry. All this provided
+     * that we do not exceed the transport-specific limit on the number of
+     * recipients per transaction. Skip recipients with a dead transport or
+     * destination.
      */
 #define LIMIT_OK(limit, count) ((limit) == 0 || ((count) < (limit)))
 
@@ -633,13 +633,13 @@ static void qmgr_message_assign(QMGR_MESSAGE *message)
                || !LIMIT_OK(entry->queue->transport->recipient_limit,
                             entry->rcpt_list.len)) {
                entry = qmgr_entry_create(queue, message);
-               entry->rcpt_list.info = recipient;
-               entry->rcpt_list.len = 1;
-           } else {
-               entry->rcpt_list.len++;
            }
+           qmgr_rcpt_list_add(&entry->rcpt_list, recipient->offset, recipient->address);
+           qmgr_recipient_count++;
        }
     }
+    qmgr_rcpt_list_free(&message->rcpt_list);
+    qmgr_rcpt_list_init(&message->rcpt_list);
 }
 
 /* qmgr_message_free - release memory for in-core message structure */
@@ -658,7 +658,6 @@ void    qmgr_message_free(QMGR_MESSAGE *message)
        myfree(message->errors_to);
     if (message->return_receipt)
        myfree(message->return_receipt);
-    qmgr_recipient_count -= message->rcpt_list.len;
     qmgr_rcpt_list_free(&message->rcpt_list);
     qmgr_message_count--;
     myfree((char *) message);
index be0aa0c13551c172263c93b2925176a2dcfca633..d3e41b4820d10306b946b48edce0ee0cb033bb10 100644 (file)
@@ -498,16 +498,13 @@ static char *extract_addr(SMTPD_STATE *state, SMTPD_TOKEN *arg,
     }
 
     /*
-     * Report trouble.
+     * Report trouble. Log a warning only if we are going to sleep+reject.
      */
-    if (naddr != 1) {                          /* sorry, no can do */
+    if (naddr != 1
+    || (var_strict_rfc821_env && (non_addr || *STR(arg->vstrval) != '<'))) {
        msg_warn("Illegal address syntax from %s in %s command: %s",
                 state->namaddr, state->where, STR(arg->vstrval));
        err = "501 Bad address syntax";
-    } else if (non_addr > 0) {                 /* it works with Sendmail... */
-       msg_warn("Illegal address syntax from %s in %s command: %s",
-                state->namaddr, state->where, STR(arg->vstrval));
-       err = (var_strict_rfc821_env ? "501 Bad address syntax" : 0);
     }
 
     /*
index 67f716cfdb30bd7c1a763327ed2ea73fdd3c75a7..e28725ae63a9f4e266da552fdcddd955e6778e42 100644 (file)
@@ -215,6 +215,7 @@ static const char *dict_ldap_lookup(DICT *dict, const char *name)
                         myname, dict_ldap->ldapsource);
        }
     }
+
     /*
      * Prepare the query.
      */
@@ -277,6 +278,7 @@ static const char *dict_ldap_lookup(DICT *dict, const char *name)
                             LDAP_SCOPE_SUBTREE,
                             vstring_str(filter_buf),
                             0, 0, &tv, &res)) == LDAP_SUCCESS) {
+
        /*
         * Search worked; extract the requested result_attribute.
         */
@@ -294,6 +296,7 @@ static const char *dict_ldap_lookup(DICT *dict, const char *name)
                msg_warn("%s: entry doesn't have any values for %s", myname, dict_ldap->result_attribute);
                continue;
            }
+
            /*
             * Append each returned address to the result list.
             */
@@ -488,6 +491,7 @@ DICT   *dict_ldap_open(const char *ldapsource, int dummy, int dict_flags)
 
        if (msg_verbose)
            msg_info("%s: after ldap_open", myname);
+
        /*
         * If this server requires a bind, do so.
         */