Implement -G => "control=suppress_local_fixups"
[exim.git] / src / src / receive.c
index 914b1d2811b6a5801e92157c3e769ade0033da8b..2c1b384998c636c318cf70539d089dcd60610cf7 100644 (file)
@@ -1,10 +1,8 @@
-/* $Cambridge: exim/src/src/receive.c,v 1.55 2010/06/05 11:13:30 pdp Exp $ */
-
 /*************************************************
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
-/* Copyright (c) University of Cambridge 1995 - 2009 */
+/* Copyright (c) University of Cambridge 1995 - 2012 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 /* Code for receiving a message and setting up spool files. */
@@ -1208,7 +1206,8 @@ Either a non-null list of recipients, or the extract flag will be true, or
 both. The flag sender_local is true for locally generated messages. The flag
 submission_mode is true if an ACL has obeyed "control = submission". The flag
 suppress_local_fixups is true if an ACL has obeyed "control =
-suppress_local_fixups". The flag smtp_input is true if the message is to be
+suppress_local_fixups" or -G was passed on the command-line.
+The flag smtp_input is true if the message is to be
 handled using SMTP conventions about termination and lines starting with dots.
 For non-SMTP messages, dot_ends is true for dot-terminated messages.
 
@@ -3022,14 +3021,29 @@ else
                appears in the expanded list. */
             if (seen_items != NULL)
               {
+              uschar *seen_item = NULL;
+              uschar seen_item_buf[256];
               uschar *seen_items_list = seen_items;
-              if (match_isinlist(item,
-                    &seen_items_list,0,NULL,NULL,MCL_STRING,TRUE,NULL) == OK)
+              int seen_this_item = 0;
+              
+              while ((seen_item = string_nextinlist(&seen_items_list, &sep,
+                                                    seen_item_buf,
+                                                    sizeof(seen_item_buf))) != NULL)
+                {
+                  if (Ustrcmp(seen_item,item) == 0)
+                    {
+                      seen_this_item = 1;
+                      break;
+                    } 
+                }
+
+              if (seen_this_item > 0)
                 {
                 DEBUG(D_receive)
                   debug_printf("acl_smtp_dkim: skipping signer %s, already seen\n", item);
                 continue;
                 }
+              
               seen_items = string_append(seen_items,&seen_items_size,&seen_items_offset,1,":");
               }
 
@@ -3475,6 +3489,9 @@ if ((log_extra_selector & LX_tls_certificate_verified) != 0 &&
 if ((log_extra_selector & LX_tls_peerdn) != 0 && tls_peerdn != NULL)
   s = string_append(s, &size, &sptr, 3, US" DN=\"",
     string_printing(tls_peerdn), US"\"");
+if ((log_extra_selector & LX_tls_sni) != 0 && tls_sni != NULL)
+  s = string_append(s, &size, &sptr, 3, US" SNI=\"",
+    string_printing(tls_sni), US"\"");
 #endif
 
 if (sender_host_authenticated != NULL)