details, an internal consistency trap could be hit while walking the list
of servers.
+JH/27 Bug 2648: fix the passing of an authenticator public-name through spool
+ files. The value is used by the authresults expansion item. Previously
+ if this was used in a router or transport, a crash could result.
+
Exim version 4.94
-----------------
uschar *sender_fullhost = NULL;
uschar *sender_helo_name = NULL;
uschar *sender_host_address = NULL;
+uschar *sender_host_auth_pubname = NULL;
uschar *sender_host_authenticated = NULL;
uschar *sender_host_name = NULL;
int sender_host_port = 0;
g = string_append(g, 2, US";\n\tauth=pass (", sender_host_auth_pubname);
-if (Ustrcmp(sender_host_auth_pubname, "tls") != 0)
- g = string_append(g, 2, US") smtp.auth=", authenticated_id);
-else if (authenticated_id)
- g = string_append(g, 2, US") x509.auth=", authenticated_id);
+if (Ustrcmp(sender_host_auth_pubname, "tls") == 0)
+ g = authenticated_id
+ ? string_append(g, 2, US") x509.auth=", authenticated_id)
+ : string_cat(g, US") reason=x509.auth");
else
- g = string_cat(g, US") reason=x509.auth");
+ g = authenticated_id
+ ? string_append(g, 2, US") smtp.auth=", authenticated_id)
+ : string_cat(g, US", no id saved)");
if (authenticated_sender)
g = string_append(g, 2, US" smtp.mailfrom=", authenticated_sender);
sender_host_address = NULL;
sender_host_name = NULL;
sender_host_port = 0;
-sender_host_authenticated = NULL;
+sender_host_authenticated = sender_host_auth_pubname = NULL;
sender_ident = NULL;
f.sender_local = FALSE;
f.sender_set_untrusted = FALSE;
host_lookup_deferred = TRUE;
else if (Ustrcmp(p, "ost_lookup_failed") == 0)
host_lookup_failed = TRUE;
+ else if (Ustrncmp(p, "ost_auth_pubname", 16) == 0)
+ sender_host_auth_pubname = string_copy_taint(var + 18, tainted);
else if (Ustrncmp(p, "ost_auth", 8) == 0)
sender_host_authenticated = string_copy_taint(var + 10, tainted);
else if (Ustrncmp(p, "ost_name", 8) == 0)
fprintf(fp, "-host_address %s.%d\n", sender_host_address, sender_host_port);
if (sender_host_name)
spool_var_write(fp, US"host_name", sender_host_name);
- if (sender_host_authenticated)
- spool_var_write(fp, US"host_auth", sender_host_authenticated);
}
+if (sender_host_authenticated)
+ spool_var_write(fp, US"host_auth", sender_host_authenticated);
+if (sender_host_auth_pubname)
+ spool_var_write(fp, US"host_auth_pubname", sender_host_auth_pubname);
/* Also about the interface a message came in on */
d1:
driver = accept
headers_add = aid: $authenticated_id
+ headers_add = rtr_authres: ${authresults {$primary_hostname}}
retry_use_local_part
transport = t1
From: CALLER_NAME <CALLER@myhost.test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000
aid: userx
+rtr_authres: Authentication-Results: myhost.test.ex;
+ auth=pass (PLAIN) smtp.auth=userx
Test data
--helo_name rhu.barb
-host_address 127.0.0.1.9999
-host_auth au1
+-host_auth_pubname PLAIN
-interface_address 127.0.0.1.1225
-received_protocol esmtpa
-body_linecount 0
--helo_name rhu.barb
-host_address 127.0.0.1.9999
-host_auth au1
+-host_auth_pubname PLAIN
-interface_address 127.0.0.1.1225
-received_protocol esmtpa
-body_linecount 0
--helo_name rhu.barb
-host_address 127.0.0.1.9999
-host_auth au1
+-host_auth_pubname PLAIN
-interface_address 127.0.0.1.1225
-received_protocol esmtpa
-body_linecount 0
--helo_name rhu.barb
-host_address 127.0.0.1.9999
-host_auth au1
+-host_auth_pubname PLAIN
-interface_address 127.0.0.1.1225
-received_protocol esmtpa
-body_linecount 0
--helo_name rhu.barb
-host_address 127.0.0.1.9999
-host_auth au1
+-host_auth_pubname PLAIN
-interface_address 127.0.0.1.1225
-received_protocol esmtpa
-body_linecount 0