diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2016-08-02 10:53:06 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2016-08-02 16:46:32 +0100 |
commit | e0cc6cda55782d98187cdc2d11b7c3352e75c7d4 (patch) | |
tree | 2cebd3a43d398e8afa756dc3298120650cfa6689 /src | |
parent | 0b20855c02c44cb79a33824596e3ad8dc906131f (diff) |
transmit logging
Diffstat (limited to 'src')
-rw-r--r-- | src/src/deliver.c | 14 | ||||
-rw-r--r-- | src/src/structs.h | 7 | ||||
-rw-r--r-- | src/src/transports/smtp.c | 1 |
3 files changed, 17 insertions, 5 deletions
diff --git a/src/src/deliver.c b/src/src/deliver.c index 419dee92c..a8d740cde 100644 --- a/src/src/deliver.c +++ b/src/src/deliver.c @@ -715,7 +715,7 @@ host_item * h = addr->host_used; s = string_append(s, sp, pp, 2, US" H=", h->name); if (LOGGING(dnssec) && h->dnssec == DS_YES) - s = string_cat(s, sp, pp, US" DS"); + s = string_catn(s, sp, pp, US" DS", 3); s = string_append(s, sp, pp, 3, US" [", h->address, US"]"); @@ -962,8 +962,11 @@ else #ifndef DISABLE_PRDR if (addr->flags & af_prdr_used) - s = string_append(s, &size, &ptr, 1, US" PRDR"); + s = string_catn(s, &size, &ptr, US" PRDR", 5); #endif + + if (addr->flags & af_chunking_used) + s = string_catn(s, &size, &ptr, US" K", 2); } /* confirmation message (SMTP (host_used) and LMTP (driver_name)) */ @@ -3289,6 +3292,10 @@ while (!done) break; #endif + case 'K': + addr->flags |= af_chunking_used; + break; + case 'D': if (!addr) goto ADDR_MISMATCH; memcpy(&(addr->dsn_aware), ptr, sizeof(addr->dsn_aware)); @@ -4527,6 +4534,9 @@ for (delivery_count = 0; addr_remote; delivery_count++) rmt_dlv_checked_write(fd, 'P', '0', NULL, 0); #endif + if (addr->flags & af_chunking_used) + rmt_dlv_checked_write(fd, 'K', '0', NULL, 0); + memcpy(big_buffer, &addr->dsn_aware, sizeof(addr->dsn_aware)); rmt_dlv_checked_write(fd, 'D', '0', big_buffer, sizeof(addr->dsn_aware)); DEBUG(D_deliver) debug_printf("DSN write: addr->dsn_aware = %d\n", addr->dsn_aware); diff --git a/src/src/structs.h b/src/src/structs.h index e378a16a2..ffbc899a5 100644 --- a/src/src/structs.h +++ b/src/src/structs.h @@ -546,12 +546,13 @@ typedef struct address_item_propagated { #ifndef DISABLE_PRDR # define af_prdr_used 0x08000000 /* delivery used SMTP PRDR */ #endif -#define af_force_command 0x10000000 /* force_command in pipe transport */ +#define af_chunking_used 0x10000000 /* delivery used SMTP CHUNKING */ +#define af_force_command 0x20000000 /* force_command in pipe transport */ #ifdef EXPERIMENTAL_DANE -# define af_dane_verified 0x20000000 /* TLS cert verify done with DANE */ +# define af_dane_verified 0x40000000 /* TLS cert verify done with DANE */ #endif #ifdef SUPPORT_I18N -# define af_utf8_downcvt 0x40000000 /* downconvert was done for delivery */ +# define af_utf8_downcvt 0x80000000 /* downconvert was done for delivery */ #endif /* These flags must be propagated when a child is created */ diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c index a265e566e..110ced240 100644 --- a/src/src/transports/smtp.c +++ b/src/src/transports/smtp.c @@ -2704,6 +2704,7 @@ else #ifndef DISABLE_PRDR if (prdr_active) addr->flags |= af_prdr_used; #endif + if (peer_offered & PEER_OFFERED_CHUNKING) addr->flags |= af_chunking_used; flag = '-'; #ifndef DISABLE_PRDR |