Add optional authenticated_sender info to A= elements of log lines; bug 1314.
[exim.git] / src / src / transports / smtp.c
index 36a053f2cdf0f774c13f5f8edae952bbcad36c81..b4ef7cf4d77c72af3ea5a8f742430e99cab9c09b 100644 (file)
@@ -1349,6 +1349,9 @@ if (continue_hostname == NULL
             {
             case OK:
             smtp_authenticated = TRUE;   /* stops the outer loop */
+           client_authenticator = au->name;
+           if (au->set_client_id != NULL)
+             client_authenticated_id = expand_string(au->set_client_id);
             break;
 
             /* Failure after writing a command */
@@ -1496,7 +1499,10 @@ if ((smtp_authenticated || ob->authenticated_sender_force) &&
   string_format(p, sizeof(buffer) - (p-buffer), " AUTH=%s",
     auth_xtextencode(local_authenticated_sender,
     Ustrlen(local_authenticated_sender)));
+  client_authenticated_sender = string_copy(local_authenticated_sender);
   }
+else
+  client_authenticated_sender = NULL;
 
 /* From here until we send the DATA command, we can make use of PIPELINING
 if the server host supports it. The code has to be able to check the responses
@@ -3115,8 +3121,8 @@ for (addr = addrlist; addr != NULL; addr = addr->next)
 for which hosts to become available. For some message-specific errors, the
 update_waiting flag is turned off because we don't want follow-on deliveries in
 those cases.  If this transport instance is explicitly limited to one message
-per connection, follow-on deliveries are not possible, and there's no need
-to create/update a waiting database. */
+per connection then follow-on deliveries are not possible and there's no need
+to create/update the per-transport wait-<transport_name> database. */
 
 if (update_waiting && tblock->connection_max_messages != 1)
   transport_update_waiting(hostlist, tblock->name);