string_printing(addr->peerdn), US"\"");
#endif
- if (smtp_authenticated)
+ if (addr->authenticator)
{
- s = string_append(s, &size, &ptr, 2, US" A=", client_authenticator);
- if (client_authenticated_id)
+ s = string_append(s, &size, &ptr, 2, US" A=", addr->authenticator);
+ if (addr->auth_id)
{
- s = string_append(s, &size, &ptr, 2, US":", client_authenticated_id);
- if (log_extra_selector & LX_smtp_mailauth && client_authenticated_sender)
- s = string_append(s, &size, &ptr, 2, US":", client_authenticated_sender);
+ s = string_append(s, &size, &ptr, 2, US":", addr->auth_id);
+ if (log_extra_selector & LX_smtp_mailauth && addr->auth_sndr)
+ s = string_append(s, &size, &ptr, 2, US":", addr->auth_sndr);
}
}
switch (*ptr++)
{
case '1':
- smtp_authenticated = TRUE;
- client_authenticator = (*ptr)? string_copy(ptr) : NULL;
+ addr->authenticator = (*ptr)? string_copy(ptr) : NULL;
break;
case '2':
- client_authenticated_id = (*ptr)? string_copy(ptr) : NULL;
+ addr->auth_id = (*ptr)? string_copy(ptr) : NULL;
break;
case '3':
- client_authenticated_sender = (*ptr)? string_copy(ptr) : NULL;
+ addr->auth_sndr = (*ptr)? string_copy(ptr) : NULL;
break;
}
while (*ptr++);
deliver_set_expansions(addr);
+ /* Ensure any transport-set auth info is fresh */
+ addr->authenticator = addr->auth_id = addr->auth_sndr = NULL;
+
/* Compute the return path, expanding a new one if required. The old one
must be set first, as it might be referred to in the expansion. */
authenticator's client driver is running. */
smtp_authenticated = FALSE;
+ client_authenticator = client_authenticated_id = client_authenticated_sender = NULL;
require_auth = verify_check_this_host(&(ob->hosts_require_auth), NULL,
host->name, host->address, NULL);
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