Change PH/12 for 4.50 fixed one bug and introduced another; if a host's
authorPhilip Hazel <ph10@hermes.cam.ac.uk>
Thu, 7 Apr 2005 10:54:54 +0000 (10:54 +0000)
committerPhilip Hazel <ph10@hermes.cam.ac.uk>
Thu, 7 Apr 2005 10:54:54 +0000 (10:54 +0000)
IP address could not be found in an SMTP router, Exim went into a hard
loop (unless it was the only host).

doc/doc-txt/ChangeLog
src/src/globals.c
src/src/macros.h
src/src/transports/smtp.c

index 8befccba94e35fecf22b61d1da9603f099f89932..cb661b9431d7fdf3ae79d6c042535904bd7d3675 100644 (file)
@@ -1,4 +1,4 @@
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.121 2005/04/07 10:10:01 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.122 2005/04/07 10:54:54 ph10 Exp $
 
 Change log file for Exim from version 4.21
 -------------------------------------------
@@ -206,6 +206,12 @@ PH/34 Change 4.50/80 broke Exim in that it could no longer handle cases where
       the uid or gid is negative. A case of a negative gid caused this to be
       noticed. The fix allows for either to be negative.
 
+PH/35 ACL_WHERE_MIME is now declared unconditionally, to avoid too much code
+      clutter, but the tables that are indexed by ACL_WHERE_xxx values had been
+      overlooked.
+
+PH/36 The change PH/12 above was broken. Fixed it.
+
 
 A note about Exim versions 4.44 and 4.50
 ----------------------------------------
index 5fe414b43cfd7e8946b7911bf89275fb66105586..5a7838be38a68ee8d75e932b917f8369b3cbcdf7 100644 (file)
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/globals.c,v 1.21 2005/04/04 10:33:49 ph10 Exp $ */
+/* $Cambridge: exim/src/src/globals.c,v 1.22 2005/04/07 10:54:54 ph10 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
@@ -191,9 +191,7 @@ error codes - keep in step with definitions of ACL_WHERE_xxxx in macros.h. */
 uschar *acl_wherenames[]       = { US"RCPT",
                                    US"MAIL",
                                    US"PREDATA",
-#ifdef WITH_CONTENT_SCAN
                                    US"MIME",
-#endif
                                    US"DATA",
                                    US"non-SMTP",
                                    US"AUTH",
@@ -210,9 +208,7 @@ uschar *acl_wherenames[]       = { US"RCPT",
 int     acl_wherecodes[]       = { 550,     /* RCPT */
                                    550,     /* MAIL */
                                    550,     /* PREDATA */
-#ifdef WITH_CONTENT_SCAN
                                    550,     /* MIME */
-#endif
                                    550,     /* DATA */
                                    0,       /* not SMTP; not relevant */
                                    503,     /* AUTH */
index 86bb84f1281dbb295d64aff5435e1def3f1b9a1f..2eef204a3ca2af5de32abf9d95d1fbc7d3beede0 100644 (file)
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/macros.h,v 1.11 2005/03/22 14:11:54 ph10 Exp $ */
+/* $Cambridge: exim/src/src/macros.h,v 1.12 2005/04/07 10:54:54 ph10 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
@@ -742,18 +742,18 @@ enum { MCL_STRING, MCL_DOMAIN, MCL_HOST, MCL_ADDRESS, MCL_LOCALPART };
 /* Codes for the places from which ACLs can be called. These are cunningly
 ordered to make it easy to implement tests for certain ACLs when processing
 "control" modifiers, by means of a maximum "where" value. Do not modify this
-order without checking carefully! Furthermore, remember to keep these in step
-with the tables of names and response codes in globals.c. */
+order without checking carefully!
+
+**** IMPORTANT***
+****   Furthermore, remember to keep these in step with the tables
+****   of names and response codes in globals.c.
+**** IMPORTANT ****
+*/
 
 enum { ACL_WHERE_RCPT,       /* Some controls are for RCPT only */
        ACL_WHERE_MAIL,       /* )                                           */
        ACL_WHERE_PREDATA,    /* ) There are several tests for "in message", */
-                             /* ) implemented by <= WHERE_NOTSMTP           */
-
-/* Remove next line in case of removeing WITH_CONTENT_SCAN.
-   ACL_WHERE_MIME is defined unconditionally to avoid clutter in acl.c */
-       ACL_WHERE_MIME,       /* )                                           */
-
+       ACL_WHERE_MIME,       /* ) implemented by <= WHERE_NOTSMTP           */
        ACL_WHERE_DATA,       /* )                                           */
        ACL_WHERE_NOTSMTP,    /* )                                           */
 
index 91410332d095641b2f80114c08845b843b2ad51b..f53d742e4cc89ca80e21abf7f8a05c1afa72f230 100644 (file)
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/transports/smtp.c,v 1.9 2005/04/06 15:26:52 ph10 Exp $ */
+/* $Cambridge: exim/src/src/transports/smtp.c,v 1.10 2005/04/07 10:54:54 ph10 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
@@ -2175,6 +2175,12 @@ for (cutoff_retry = 0; expired &&
     uschar *retry_message_key = NULL;
     uschar *serialize_key = NULL;
 
+    /* Default next host is next host. :-) But this can vary if the
+    hosts_max_try limit is hit (see below). It may also be reset if a host
+    address is looked up here (in case the host was multihomed). */
+
+    nexthost = host->next;
+
     /* Set the flag requesting that this host be added to the waiting
     database if the delivery fails temporarily or if we are running with
     queue_smtp or a 2-stage queue run. This gets unset for certain
@@ -2281,10 +2287,8 @@ for (cutoff_retry = 0; expired &&
       continue;      /* With next host */
       }
 
-    /* The default next host is the next host. :-) But this can vary if the
-    hosts_max_try limit is hit (see below). NOTE: we cannot put this setting
-    earlier than this, because a multihomed host whose addresses are not looked
-    up till just above will add to the host list. */
+    /* Reset the default next host in case a multihomed host whose addresses
+    are not looked up till just above added to the host list. */
 
     nexthost = host->next;