Mail: logging upstream to the error log with "smtp_auth none;".

Previously, it was never logged because of missing login.
This commit is contained in:
Sergey Kandaurov authored and pluknet committed 2025-08-13 18:20:34 +04:00
1 parent 9c02c84a74
commit 239e10793a
1 file changed
+4 -6
+4 -6
View File
@@ -1006,14 +1006,12 @@ ngx_mail_log_error(ngx_log_t *log, u_char *buf, size_t len)
len -= p - buf;
buf = p;
if (s->login.len == 0) {
return p;
if (s->login.len) {
p = ngx_snprintf(buf, len, ", login: \"%V\"", &s->login);
len -= p - buf;
buf = p;
}
p = ngx_snprintf(buf, len, ", login: \"%V\"", &s->login);
len -= p - buf;
buf = p;
if (s->proxy == NULL) {
return p;
}