JH/16 Fix comparisons for 64b. Bugzilla 1385.
+TL/09 Add expansion variable $authenticated_fail_id to keep track of
+ last id that failed so it may be referenced in subsequent ACL's.
+
Exim version 4.80.1
-------------------
{ "address_data", vtype_stringptr, &deliver_address_data },
{ "address_file", vtype_stringptr, &address_file },
{ "address_pipe", vtype_stringptr, &address_pipe },
+ { "authenticated_fail_id",vtype_stringptr, &authenticated_fail_id },
{ "authenticated_id", vtype_stringptr, &authenticated_id },
{ "authenticated_sender",vtype_stringptr, &authenticated_sender },
{ "authentication_failed",vtype_int, &authentication_failed },
BOOL allow_unqualified_recipient = TRUE; /* For local messages */
BOOL allow_unqualified_sender = TRUE; /* Reset for SMTP */
BOOL allow_utf8_domains = FALSE;
+uschar *authenticated_fail_id = NULL;
uschar *authenticated_id = NULL;
uschar *authenticated_sender = NULL;
BOOL authentication_failed = FALSE;
extern BOOL allow_unqualified_recipient; /* As it says */
extern BOOL allow_unqualified_sender; /* Ditto */
extern BOOL allow_utf8_domains; /* For experimenting */
+extern uschar *authenticated_fail_id; /* ID that failed authentication */
extern uschar *authenticated_id; /* ID that was authenticated */
extern uschar *authenticated_sender; /* From AUTH on MAIL */
extern BOOL authentication_failed; /* TRUE if AUTH was tried and failed */
if (set_id != NULL) authenticated_id = string_copy_malloc(set_id);
sender_host_authenticated = au->name;
authentication_failed = FALSE;
+ authenticated_fail_id = NULL; /* Impossible to already be set? */
received_protocol =
protocols[pextend + pauthed + ((tls_in.active >= 0)? pcrpted:0)] +
((sender_host_address != NULL)? pnlocal : 0);
/* Fall through */
case DEFER:
+ if (set_id != NULL) authenticated_fail_id = string_copy_malloc(set_id);
s = string_sprintf("435 Unable to authenticate at present%s",
auth_defer_user_msg);
ss = string_sprintf("435 Unable to authenticate at present%s: %s",
break;
case FAIL:
+ if (set_id != NULL) authenticated_fail_id = string_copy_malloc(set_id);
s = US"535 Incorrect authentication data";
ss = string_sprintf("535 Incorrect authentication data%s", set_id);
break;
default:
+ if (set_id != NULL) authenticated_fail_id = string_copy_malloc(set_id);
s = US"435 Internal error";
ss = string_sprintf("435 Internal error%s: return %d from authentication "
"check", set_id, c);