diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/src/deliver.c | 35 | ||||
-rw-r--r-- | src/src/transports/lmtp.c | 8 |
2 files changed, 26 insertions, 17 deletions
diff --git a/src/src/deliver.c b/src/src/deliver.c index b1a3b4cc6..df93a114e 100644 --- a/src/src/deliver.c +++ b/src/src/deliver.c @@ -812,23 +812,26 @@ else if (addr->flags & af_prdr_used) s = string_append(s, &size, &ptr, 1, US" PRDR"); #endif + } - if ((log_extra_selector & LX_smtp_confirmation) != 0 && - addr->message != NULL) - { - int i; - uschar *p = big_buffer; - uschar *ss = addr->message; - *p++ = '\"'; - for (i = 0; i < 100 && ss[i] != 0; i++) - { - if (ss[i] == '\"' || ss[i] == '\\') *p++ = '\\'; - *p++ = ss[i]; - } - *p++ = '\"'; - *p = 0; - s = string_append(s, &size, &ptr, 2, US" C=", big_buffer); - } +/* confirmation message (SMTP (host_used) and LMTP (driver_name)) */ + +if ((log_extra_selector & LX_smtp_confirmation) != 0 && + addr->message != NULL && + ((addr->host_used != NULL) || (Ustrcmp(addr->transport->driver_name, "lmtp") == 0))) + { + int i; + uschar *p = big_buffer; + uschar *ss = addr->message; + *p++ = '\"'; + for (i = 0; i < 100 && ss[i] != 0; i++) + { + if (ss[i] == '\"' || ss[i] == '\\') *p++ = '\\'; + *p++ = ss[i]; + } + *p++ = '\"'; + *p = 0; + s = string_append(s, &size, &ptr, 2, US" C=", big_buffer); } /* Time on queue and actual time taken to deliver */ diff --git a/src/src/transports/lmtp.c b/src/src/transports/lmtp.c index 06eb72969..7a1e7c471 100644 --- a/src/src/transports/lmtp.c +++ b/src/src/transports/lmtp.c @@ -662,8 +662,14 @@ if (send_data) if (addr->transport_return != PENDING_OK) continue; if (lmtp_read_response(out, buffer, sizeof(buffer), '2', timeout)) + { addr->transport_return = OK; - + if ((log_extra_selector & LX_smtp_confirmation) != 0) + { + uschar *s = string_printing(buffer); + addr->message = (s == buffer)? (uschar *)string_copy(s) : s; + } + } /* If the response has failed badly, use it for all the remaining pending addresses and give up. */ |