Indicate that duplicates shown in -bt output would not result in an
[exim.git] / src / src / verify.c
index b33ebb6df9558821176fc2aafeefed040942d18b..841285fdca72364d0ca5b2dac374abebf4b9e956 100644 (file)
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/verify.c,v 1.34 2006/02/21 16:24:19 ph10 Exp $ */
+/* $Cambridge: exim/src/src/verify.c,v 1.37 2006/06/30 15:36:08 ph10 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
@@ -793,6 +793,7 @@ if (addr != vaddr)
   vaddr->user_message = addr->user_message;
   vaddr->basic_errno = addr->basic_errno;
   vaddr->more_errno = addr->more_errno;
+  vaddr->p.address_data = addr->p.address_data;
   }
 return yield;
 }
@@ -1261,9 +1262,12 @@ or autoreplies, and there were no errors or deferments, the message is to be
 discarded, usually because of the use of :blackhole: in an alias file. */
 
 if (allok && addr_local == NULL && addr_remote == NULL)
+  {
   fprintf(f, "mail to %s is discarded\n", address);
+  return yield;
+  }
 
-else for (addr_list = addr_local, i = 0; i < 2; addr_list = addr_remote, i++)
+for (addr_list = addr_local, i = 0; i < 2; addr_list = addr_remote, i++)
   {
   while (addr_list != NULL)
     {
@@ -1276,6 +1280,19 @@ else for (addr_list = addr_local, i = 0; i < 2; addr_list = addr_remote, i++)
     if(addr->p.srs_sender)
       fprintf(f, "    [srs = %s]", addr->p.srs_sender);
 #endif
+
+    /* If the address is a duplicate, show something about it. */
+
+    if (!testflag(addr, af_pfr))
+      {
+      tree_node *tnode;
+      if ((tnode = tree_search(tree_duplicates, addr->unique)) != NULL)
+        fprintf(f, "   [duplicate, would not be delivered]");
+      else tree_add_duplicate(addr->unique, addr);
+      }
+
+    /* Now show its parents */
+
     while (p != NULL)
       {
       fprintf(f, "\n    <-- %s", p->address);
@@ -2124,6 +2141,7 @@ if (*t == 0)
   h.name = ss;
   h.address = NULL;
   h.mx = MX_NONE;
+
   rc = host_find_byname(&h, NULL, NULL, FALSE);
   if (rc == HOST_FOUND || rc == HOST_FOUND_LOCAL)
     {