- uschar * s = acl_current_verb();
- if (!s) s = authenticator_current_name(); /* must be before transport */
- if (!s) s = transport_current_name(); /* must be before router */
- if (!s) s = router_current_name(); /* GCC ?: would be good, but not in clang */
- if (!s) s = US"";
+ const uschar * ks = keystring;
+ uschar * loc = acl_current_verb();
+ if (!loc) loc = authenticator_current_name(); /* must be before transport */
+ if (!loc) loc = transport_current_name(); /* must be before router */
+ if (!loc) loc = router_current_name(); /* GCC ?: would be good, but not in clang */
+ if (!loc) loc = US"";
+
+ if (Ustrncmp(ks, "servers", 7) == 0) /* Avoid logging server/password */
+ if ((ks = Ustrchr(keystring, ';')))
+ while (isspace(*++ks))
+ ;
+ else
+ ks = US"";
+