]> git.netwichtig.de Git - user/henk/code/exim.git/blobdiff - src/src/receive.c
Add optional authenticated_sender info to A= elements of log lines; bug 1314.
[user/henk/code/exim.git] / src / src / receive.c
index 7b51805dca648f1f7c67d3fef182db3d9ec6b24e..2d594e46ebd894c825afa4e86a0beec7056e450c 100644 (file)
@@ -936,7 +936,6 @@ add_acl_headers(uschar *acl_name)
 {
 header_line *h, *next;
 header_line *last_received = NULL;
-int sep = ':';
 
 if (acl_removed_headers != NULL)
   {
@@ -944,7 +943,6 @@ if (acl_removed_headers != NULL)
 
   for (h = header_list; h != NULL; h = h->next)
     {
-    int i;
     uschar *list;
     BOOL include_header;
 
@@ -3604,12 +3602,26 @@ if (sender_host_authenticated != NULL)
   {
   s = string_append(s, &size, &sptr, 2, US" A=", sender_host_authenticated);
   if (authenticated_id != NULL)
+    {
     s = string_append(s, &size, &sptr, 2, US":", authenticated_id);
+    if (log_extra_selector & LX_smtp_mailauth  &&  authenticated_sender != NULL)
+      s = string_append(s, &size, &sptr, 2, US":", authenticated_sender);
+    }
   }
 
 sprintf(CS big_buffer, "%d", msg_size);
 s = string_append(s, &size, &sptr, 2, US" S=", big_buffer);
 
+/* log 8BITMIME mode announced in MAIL_FROM
+   0 ... no BODY= used
+   7 ... 7BIT
+   8 ... 8BITMIME */
+if (log_extra_selector & LX_8bitmime)
+  {
+  sprintf(CS big_buffer, "%d", body_8bitmime);
+  s = string_append(s, &size, &sptr, 2, US" M8S=", big_buffer);
+  }
+
 /* If an addr-spec in a message-id contains a quoted string, it can contain
 any characters except " \ and CR and so in particular it can contain NL!
 Therefore, make sure we use a printing-characters only version for the log.
@@ -3790,6 +3802,7 @@ for this message. */
 
    XXX We do not handle queue-only, freezing, or blackholes.
 */
+cutthrough_done = 0;
 if(cutthrough_fd >= 0)
   {
   uschar * msg= cutthrough_finaldot(); /* Ask the target system to accept the messsage */
@@ -3811,8 +3824,6 @@ if(cutthrough_fd >= 0)
       break;
     }
   }
-else
-  cutthrough_done = 0;
 
 if(smtp_reply == NULL)
   {