summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2017-05-21 16:42:05 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2017-05-21 16:50:40 +0100
commit8b6b06fe3e009cb89ae7923b890e75f9dcd50118 (patch)
tree77d91ebdd9a8f3711ee1cd78b7d4428f4ceb6130 /src
parentf77197ae2013bdb19593195588dfe4ed6bf66d3b (diff)
Debug: more info during server-side authentication
Diffstat (limited to 'src')
-rw-r--r--src/src/smtp_in.c40
1 files changed, 24 insertions, 16 deletions
diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c
index 5ff1b7f32..0ffa21939 100644
--- a/src/src/smtp_in.c
+++ b/src/src/smtp_in.c
@@ -4230,26 +4230,34 @@ while (done <= 0)
auth_instance *au;
BOOL first = TRUE;
for (au = auths; au; au = au->next)
- if (au->server && (au->advertise_condition == NULL ||
- expand_check_condition(au->advertise_condition, au->name,
- US"authenticator")))
+ {
+ au->advertised = FALSE;
+ if (au->server)
{
- int saveptr;
- if (first)
+ DEBUG(D_auth+D_expand) debug_printf_indent(
+ "Evaluating advertise_condition for %s athenticator\n",
+ au->public_name);
+ if ( !au->advertise_condition
+ || expand_check_condition(au->advertise_condition, au->name,
+ US"authenticator")
+ )
{
- s = string_catn(s, &size, &ptr, smtp_code, 3);
- s = string_catn(s, &size, &ptr, US"-AUTH", 5);
- first = FALSE;
- auth_advertised = TRUE;
+ int saveptr;
+ if (first)
+ {
+ s = string_catn(s, &size, &ptr, smtp_code, 3);
+ s = string_catn(s, &size, &ptr, US"-AUTH", 5);
+ first = FALSE;
+ auth_advertised = TRUE;
+ }
+ saveptr = ptr;
+ s = string_catn(s, &size, &ptr, US" ", 1);
+ s = string_cat (s, &size, &ptr, au->public_name);
+ while (++saveptr < ptr) s[saveptr] = toupper(s[saveptr]);
+ au->advertised = TRUE;
}
- saveptr = ptr;
- s = string_catn(s, &size, &ptr, US" ", 1);
- s = string_cat (s, &size, &ptr, au->public_name);
- while (++saveptr < ptr) s[saveptr] = toupper(s[saveptr]);
- au->advertised = TRUE;
}
- else
- au->advertised = FALSE;
+ }
if (!first) s = string_catn(s, &size, &ptr, US"\r\n", 2);
}