X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/05caaeaae58a10357a29082c288dccdcd85e8ee4..018c60d7505a46f7dfd8630fbd59a3f900f6ae22:/src/src/deliver.c diff --git a/src/src/deliver.c b/src/src/deliver.c index af39448c5..eef91036a 100644 --- a/src/src/deliver.c +++ b/src/src/deliver.c @@ -774,14 +774,14 @@ else 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); } } @@ -2928,14 +2928,13 @@ while (!done) 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++); @@ -3682,6 +3681,9 @@ for (delivery_count = 0; addr_remote != NULL; delivery_count++) 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. */