summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorSergey Kandaurov <pluknet@nginx.com>2025-07-21 17:44:28 +0400
committerpluknet <pluknet@nginx.com>2025-08-13 18:20:34 +0400
commit239e10793adb1e32847095ba6c1d14249bf19a5c (patch)
tree2fd070990157878e3296e85d38273939f1ee6854 /src
parent9c02c84a7443f3d736a1a5eb3f596de9af8a0c9c (diff)
downloadnginx-239e10793adb1e32847095ba6c1d14249bf19a5c.tar.gz
nginx-239e10793adb1e32847095ba6c1d14249bf19a5c.tar.bz2
Mail: logging upstream to the error log with "smtp_auth none;".
Previously, it was never logged because of missing login.
Diffstat (limited to 'src')
-rw-r--r--src/mail/ngx_mail_handler.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mail/ngx_mail_handler.c b/src/mail/ngx_mail_handler.c
index d3be7f3b3..a88e6c287 100644
--- a/src/mail/ngx_mail_handler.c
+++ b/src/mail/ngx_mail_handler.c
@@ -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;
}