]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.5-20071122
authorWietse Venema <wietse@porcupine.org>
Thu, 22 Nov 2007 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:33:27 +0000 (06:33 +0000)
16 files changed:
postfix/HISTORY
postfix/RELEASE_NOTES
postfix/WISHLIST
postfix/html/postconf.5.html
postfix/html/trivial-rewrite.8.html
postfix/man/man5/postconf.5
postfix/man/man8/trivial-rewrite.8
postfix/mantools/postlink
postfix/proto/postconf.proto
postfix/src/global/mail_params.h
postfix/src/global/mail_version.h
postfix/src/qmgr/qmgr_queue.c
postfix/src/trivial-rewrite/resolve.c
postfix/src/trivial-rewrite/trivial-rewrite.c
postfix/src/util/dict.h
postfix/src/util/dict_open.c

index 9cb1b12b5b05e94dfd6409c03d75794f6bf7159e..7a886a0b10313fa64878175a80e23d47507c6ef4 100644 (file)
@@ -13839,3 +13839,14 @@ Apologies for any names omitted.
        further review the number of parameters will be consolidated
        and the defaults will select the better algorithms.  Files:
        qmgr/qmgr_queue.c, qmgr/qmgr_deliver.c.
+
+20071121
+
+       Boundary condition: Patrik Rak pointed out that handling
+       of negative feedback with concurrency window 1 could
+       be improved.
+
+       Feature: support to look up null sender addresses
+       in sender-dependent relayhost maps. Parameter name:
+       empty_address_relayhost_maps_lookup_key (default; <>).
+       Keean Schupke. File: trivial-rewrite/resolve.c.
index c9dff4ce1f3861032a1a4f6096520ec01a6a73da..d6d5999ed0c0635a6c36d18eabe568e81cab22f7 100644 (file)
@@ -33,10 +33,9 @@ number of pseudo-cohorts(*) reports connection or handshake failure.
 The drawbacks of the old +/-1 feedback scheduler are a) overshoot
 due to exponential delivery concurrency growth with each pseudo-cohort(*)
 (5-10-20...); b) throttling down to zero concurrency after a single
-pseudo-cohort(*) failure. The second problem was especially an issue
-with low-concurrency channels where a single failure could be
-sufficient to mark a destination as "dead", and suspend further
-deliveries.
+pseudo-cohort(*) failure. This was especially an issue with
+low-concurrency channels where a single failure could be sufficient
+to mark a destination as "dead", and suspend further deliveries.
 
 The new code is a laboratory model with a multitude of configuration
 parameters, so that developers can experiment with different feedback
index 30c45f92dcdce8d4901333767afe7bee57db00de..7592b261f66c0ace7ce378c143b0eda5c603ad30 100644 (file)
@@ -1,5 +1,7 @@
 Wish list:
 
+       document dict_get() as returning const char *
+
        Make event_drain() a proper event loop; update the zero mask,
        and don't ignore a non-empty timer queue.
 
index 2d9054f51b89af3c89a914be0938b7ce89f5ef56..eb47366d37435b104d10170490d8a2508e05a640 100644 (file)
@@ -2253,6 +2253,19 @@ created locally as the result of configuration or software error.
 </p>
 
 
+</DD>
+
+<DT><b><a name="empty_address_relayhost_maps_lookup_key">empty_address_relayhost_maps_lookup_key</a>
+(default: <>)</b></DT><DD>
+
+<p> The <a href="postconf.5.html#sender_dependent_relayhost_maps">sender_dependent_relayhost_maps</a> search string that will be
+used instead of the null sender address. </p>
+
+<p> This feature is available in Postfix 2.5 and later. With
+earlier versions, <a href="postconf.5.html#sender_dependent_relayhost_maps">sender_dependent_relayhost_maps</a> lookups were
+skipped for the null sender address.  </p>
+
+
 </DD>
 
 <DT><b><a name="enable_errors_to">enable_errors_to</a>
index 18b5b7a343453c3192a7be597877f002b562840a..108485745e48fdf740b4e93991939315e94e14ac 100644 (file)
@@ -193,6 +193,13 @@ TRIVIAL-REWRITE(8)                                          TRIVIAL-REWRITE(8)
               A  sender-dependent  override for the global <a href="postconf.5.html#relayhost">relay</a>-
               <a href="postconf.5.html#relayhost">host</a> parameter setting.
 
+       Available in Postfix version 2.5 and later:
+
+       <b><a href="postconf.5.html#empty_address_relayhost_maps_lookup_key">empty_address_relayhost_maps_lookup_key</a> (</b>&lt;&gt;<b>)</b>
+              The <a href="postconf.5.html#sender_dependent_relayhost_maps">sender_dependent_relayhost_maps</a>  search  string
+              that  will  be  used  instead  of  the  null sender
+              address.
+
 <b>ADDRESS VERIFICATION CONTROLS</b>
        Postfix  version  2.1  introduces  sender  and   recipient
        address  verification.   This  feature  is  implemented by
index d39222ab129f0b0ed858fbbad4dc825d77d8309f..bc75192dd4834ea4fe20ffca5a5b9c216ec14a79 100644 (file)
@@ -1212,6 +1212,13 @@ for \fBshowq\fR(8) queue displays.
 The recipient of mail addressed to the null address.  Postfix does
 not accept such addresses in SMTP commands, but they may still be
 created locally as the result of configuration or software error.
+.SH empty_address_relayhost_maps_lookup_key (default: <>)
+The sender_dependent_relayhost_maps search string that will be
+used instead of the null sender address.
+.PP
+This feature is available in Postfix 2.5 and later. With
+earlier versions, sender_dependent_relayhost_maps lookups were
+skipped for the null sender address.
 .SH enable_errors_to (default: no)
 Report mail delivery errors to the address specified with the
 non-standard Errors-To: message header, instead of the envelope
index 7252e4388b1aa75783f6fc29c71028edb8914260..200891de0687a3776e6f198e09126b2dac57cbb7 100644 (file)
@@ -172,6 +172,11 @@ Available in Postfix version 2.3 and later:
 .IP "\fBsender_dependent_relayhost_maps (empty)\fR"
 A sender-dependent override for the global relayhost parameter
 setting.
+.PP
+Available in Postfix version 2.5 and later:
+.IP "\fBempty_address_relayhost_maps_lookup_key (<>)\fR"
+The sender_dependent_relayhost_maps search string that will be
+used instead of the null sender address.
 .SH "ADDRESS VERIFICATION CONTROLS"
 .na
 .nf
index 8f7b43c476dea8b07cd533cf01dafb92ccffbb38..ea5f9d3f20cc90ba9d4f8594957a8de9009cce85 100755 (executable)
@@ -379,6 +379,7 @@ while (<>) {
     s;\bsender_canonical_classes\b;<a href="postconf.5.html#sender_canonical_classes">$&</a>;g;
     s;\bsender_canonical_maps\b;<a href="postconf.5.html#sender_canonical_maps">$&</a>;g;
     s;\bsender_dependent_relay[-</bB>]*\n*[ <bB>]*host_maps\b;<a href="postconf.5.html#sender_dependent_relayhost_maps">$&</a>;g;
+    s;\bempty_address_relayhost_maps_lookup_key\b;<a href="postconf.5.html#empty_address_relayhost_maps_lookup_key">$&</a>;g;
     s;\bsendmail_path\b;<a href="postconf.5.html#sendmail_path">$&</a>;g;
     s;\bservice_throttle_time\b;<a href="postconf.5.html#service_throttle_time">$&</a>;g;
     s;\bsetgid_group\b;<a href="postconf.5.html#setgid_group">$&</a>;g;
index 42daf4e33fcf86ced302b993e83621c9f827b29e..8d7423299ea1a796f3d149d1386489e5b26c15d6 100644 (file)
@@ -9091,6 +9091,15 @@ substitutions in regular expression maps. </p>
 This feature is available in Postfix 2.3 and later.
 </p>
 
+%PARAM empty_address_relayhost_maps_lookup_key <>
+
+<p> The sender_dependent_relayhost_maps search string that will be
+used instead of the null sender address. </p>
+
+<p> This feature is available in Postfix 2.5 and later. With
+earlier versions, sender_dependent_relayhost_maps lookups were
+skipped for the null sender address.  </p>
+
 %PARAM address_verify_sender_dependent_relayhost_maps empty
 
 <p>
index 35b4a555805d0ca1ad7ca7e11a4a720c0546728a..6579ade1215e3fcf640d8ace86de575ee80cd646 100644 (file)
@@ -192,6 +192,10 @@ extern char *var_relayhost;
 #define DEF_SND_RELAY_MAPS     ""
 extern char *var_snd_relay_maps;
 
+#define VAR_NULL_RELAY_MAPS_KEY        "empty_address_relayhost_maps_lookup_key"
+#define DEF_NULL_RELAY_MAPS_KEY        "<>"
+extern char *var_null_relay_maps_key;
+
 #define VAR_SMTP_FALLBACK      "smtp_fallback_relay"
 #define DEF_SMTP_FALLBACK      "$fallback_relay"
 #define VAR_LMTP_FALLBACK      "smtp_fallback_relay"
index 51f2f6868df6b5696f5ac3f4a512dfc5b3701e22..62f2fc5e4920b909c5c46cd7ef51545149089ef7 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE      "20071121"
+#define MAIL_RELEASE_DATE      "20071122"
 #define MAIL_VERSION_NUMBER    "2.5"
 
 #ifdef SNAPSHOT
index 4d86aea2f495f61915398e8fb08910649b146a5a..08a5f1858472bf53eebf4c30fd7556cddf727059 100644 (file)
@@ -310,8 +310,11 @@ void    qmgr_queue_throttle(QMGR_QUEUE *queue, DSN *dsn)
      * adjustments on the concurrency limit itself, instead of using the
      * actual concurrency. The latter fluctuates wildly when deliveries
      * complete in bursts (artificial benchmark measurements).
+     * 
+     * Even after reaching 1, we maintain the negative hysteresis cycle so that
+     * negative feedback can cancel out positive feedback.
      */
-    if (queue->window > 1) {
+    if (queue->window > 0) {
        feedback = QMGR_FEEDBACK_VAL(qmgr_neg_feedback_idx, queue->window);
        QMGR_LOG_FEEDBACK(feedback);
        queue->failure -= feedback;
index c67d186f2c2eb45b8e1c8c7b475275157400f56e..92a3c173d2aab5e661183219f576abaf8911860b 100644 (file)
@@ -507,8 +507,9 @@ static void resolve_addr(RES_CONTEXT *rp, char *sender, char *addr,
             * With off-host delivery, sender-dependent or global relayhost
             * override the recipient domain.
             */
-           if (rp->snd_relay_info && *sender
-               && (relay = mail_addr_find(rp->snd_relay_info, sender,
+           if (rp->snd_relay_info
+               && (relay = mail_addr_find(rp->snd_relay_info, *sender ?
+                                     sender : var_null_relay_maps_key,
                                           (char **) 0)) != 0)
                vstring_strcpy(nexthop, relay);
            else if (*RES_PARAM_VALUE(rp->relayhost))
index fd315a201b4fe8d02713c4624223d9a822c15e84..2b7c9eab62e86f0c2d7cf836a362503d4a8bbed1 100644 (file)
 /* .IP "\fBsender_dependent_relayhost_maps (empty)\fR"
 /*     A sender-dependent override for the global relayhost parameter
 /*     setting.
+/* .PP
+/*     Available in Postfix version 2.5 and later:
+/* .IP "\fBempty_address_relayhost_maps_lookup_key (<>)\fR"
+/*     The sender_dependent_relayhost_maps search string that will be
+/*     used instead of the null sender address.
 /* ADDRESS VERIFICATION CONTROLS
 /* .ad
 /* .fi
@@ -315,6 +320,7 @@ int     var_show_unk_rcpt_table;
 int     var_resolve_nulldom;
 char   *var_remote_rwr_domain;
 char   *var_snd_relay_maps;
+char   *var_null_relay_maps_key;
 int     var_resolve_num_dom;
 
  /*
@@ -557,6 +563,7 @@ int     main(int argc, char **argv)
        VAR_VRFY_RELAYHOST, DEF_VRFY_RELAYHOST, &var_vrfy_relayhost, 0, 0,
        VAR_REM_RWR_DOMAIN, DEF_REM_RWR_DOMAIN, &var_remote_rwr_domain, 0, 0,
        VAR_SND_RELAY_MAPS, DEF_SND_RELAY_MAPS, &var_snd_relay_maps, 0, 0,
+       VAR_NULL_RELAY_MAPS_KEY, DEF_NULL_RELAY_MAPS_KEY, &var_null_relay_maps_key, 1, 0,
        VAR_VRFY_RELAY_MAPS, DEF_VRFY_RELAY_MAPS, &var_vrfy_relay_maps, 0, 0,
        0,
     };
index 63ea133f6251739f08c4bac21ef0a2eb23a8927a..de1691f08ce7e8835a2f51a6cf134b8d50ddd711 100644 (file)
@@ -137,7 +137,7 @@ extern DICT *dict_open(const char *, int, int);
 extern DICT *dict_open3(const char *, const char *, int, int);
 extern void dict_open_register(const char *, DICT *(*) (const char *, int, int));
 
-#define dict_get(dp, key)      (dp)->lookup((dp), (key))
+#define dict_get(dp, key)      ((const char *) (dp)->lookup((dp), (key)))
 #define dict_put(dp, key, val) (dp)->update((dp), (key), (val))
 #define dict_del(dp, key)      (dp)->delete((dp), (key))
 #define dict_seq(dp, f, key, val) (dp)->sequence((dp), (f), (key), (val))
index d56507918afc0c0964c5f9458730455f578548f2..233039c08e837d0386762880dd69eda87fdd1e58 100644 (file)
@@ -22,7 +22,7 @@
 /*     const char *key;
 /*     const char *value;
 /*
-/*     char    *dict_get(dict, key)
+/*     const char *dict_get(dict, key)
 /*     DICT    *dict;
 /*     const char *key;
 /*
 /*
 /*     dict_get() retrieves the value stored in the named dictionary
 /*     under the given key. A null pointer means the value was not found.
+/*     As with dict_lookup(), the result is owned by the lookup table
+/*     implementation. Make a copy if the result is to be modified,
+/*     or if the result is to survive multiple table lookups.
 /*
 /*     dict_put() stores the specified key and value into the named
 /*     dictionary.