diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2019-06-29 19:31:23 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2019-06-29 19:31:23 +0100 |
commit | df98a6ff2e70887890690ffbf8a8ad583d7d7e38 (patch) | |
tree | 497106c55d5d5622ca8761debb6b5d1f2b298b3e /src | |
parent | 628a70e55fef33b5a904317473551cb47cc6c58f (diff) |
Fix bounce generation under RFC 3461 request. Bug 2411
Broken-by: ea97267cea
Diffstat (limited to 'src')
-rw-r--r-- | src/src/deliver.c | 13 | ||||
-rw-r--r-- | src/src/spool_in.c | 14 | ||||
-rw-r--r-- | src/src/spool_out.c | 10 |
3 files changed, 18 insertions, 19 deletions
diff --git a/src/src/deliver.c b/src/src/deliver.c index 216bb2cb7..62daff0df 100644 --- a/src/src/deliver.c +++ b/src/src/deliver.c @@ -6189,7 +6189,7 @@ if (process_recipients != RECIP_IGNORE) to be passed on to other DSN enabled MTAs */ new->dsn_flags = r->dsn_flags & rf_dsnflags; new->dsn_orcpt = r->orcpt; - DEBUG(D_deliver) debug_printf("DSN: set orcpt: %s flags: %d\n", + DEBUG(D_deliver) debug_printf("DSN: set orcpt: %s flags: 0x%x\n", new->dsn_orcpt ? new->dsn_orcpt : US"", new->dsn_flags); switch (process_recipients) @@ -7293,7 +7293,7 @@ for (address_item * a = addr_succeed; a; a = a->next) DEBUG(D_deliver) debug_printf("DSN: processing router : %s\n" "DSN: processing successful delivery address: %s\n" "DSN: Sender_address: %s\n" - "DSN: orcpt: %s flags: %d\n" + "DSN: orcpt: %s flags: 0x%x\n" "DSN: envid: %s ret: %d\n" "DSN: Final recipient: %s\n" "DSN: Remote SMTP server supports DSN: %d\n", @@ -7491,7 +7491,8 @@ while (addr_failed) mark the recipient done. */ if ( addr_failed->prop.ignore_error - || addr_failed->dsn_flags & (rf_dsnflags & ~rf_notify_failure) + || addr_failed->dsn_flags & rf_dsnflags + && !(addr_failed->dsn_flags & rf_notify_failure) ) { addr = addr_failed; @@ -7501,11 +7502,13 @@ while (addr_failed) #ifndef DISABLE_EVENT msg_event_raise(US"msg:fail:delivery", addr); #endif - log_write(0, LOG_MAIN, "%s%s%s%s: error ignored", + log_write(0, LOG_MAIN, "%s%s%s%s: error ignored%s", addr->address, !addr->parent ? US"" : US" <", !addr->parent ? US"" : addr->parent->address, - !addr->parent ? US"" : US">"); + !addr->parent ? US"" : US">", + addr->prop.ignore_error + ? US"" : US": RFC 3461 DSN, failure notify not requested"); address_done(addr, logtod); child_done(addr, logtod); diff --git a/src/src/spool_in.c b/src/src/spool_in.c index c46689506..c5733f13e 100644 --- a/src/src/spool_in.c +++ b/src/src/spool_in.c @@ -819,7 +819,7 @@ for (recipients_count = 0; recipients_count < rcount; recipients_count++) int flags; #if !defined (COMPILE_UTILITY) - DEBUG(D_deliver) debug_printf("**** SPOOL_IN - Exim 4 standard format spoolfile\n"); + DEBUG(D_deliver) debug_printf("**** SPOOL_IN - Exim standard format spoolfile\n"); #endif (void)sscanf(CS p+1, "%d", &flags); @@ -857,16 +857,12 @@ for (recipients_count = 0; recipients_count < rcount; recipients_count++) else { DEBUG(D_deliver) debug_printf("**** SPOOL_IN - No additional fields\n"); } - if ((orcpt != NULL) || (dsn_flags != 0)) - { - DEBUG(D_deliver) debug_printf("**** SPOOL_IN - address: |%s| orcpt: |%s| dsn_flags: %d\n", + if (orcpt || dsn_flags) + DEBUG(D_deliver) debug_printf("**** SPOOL_IN - address: <%s> orcpt: <%s> dsn_flags: 0x%x\n", big_buffer, orcpt, dsn_flags); - } - if (errors_to != NULL) - { - DEBUG(D_deliver) debug_printf("**** SPOOL_IN - address: |%s| errorsto: |%s|\n", + if (errors_to) + DEBUG(D_deliver) debug_printf("**** SPOOL_IN - address: <%s> errorsto: <%s>\n", big_buffer, errors_to); - } #endif recipients_list[recipients_count].address = string_copy(big_buffer); diff --git a/src/src/spool_out.c b/src/src/spool_out.c index 508e68cea..6ceae38b2 100644 --- a/src/src/spool_out.c +++ b/src/src/spool_out.c @@ -264,9 +264,9 @@ if (message_smtputf8) #endif /* Write the dsn flags to the spool header file */ -DEBUG(D_deliver) debug_printf("DSN: Write SPOOL :-dsn_envid %s\n", dsn_envid); +DEBUG(D_deliver) debug_printf("DSN: Write SPOOL: -dsn_envid %s\n", dsn_envid); if (dsn_envid) fprintf(fp, "-dsn_envid %s\n", dsn_envid); -DEBUG(D_deliver) debug_printf("DSN: Write SPOOL :-dsn_ret %d\n", dsn_ret); +DEBUG(D_deliver) debug_printf("DSN: Write SPOOL :-dsn_ret %d\n", dsn_ret); if (dsn_ret) fprintf(fp, "-dsn_ret %d\n", dsn_ret); /* To complete the envelope, write out the tree of non-recipients, followed by @@ -280,9 +280,9 @@ for (int i = 0; i < recipients_count; i++) { recipient_item *r = recipients_list + i; - DEBUG(D_deliver) debug_printf("DSN: Flags :%d\n", r->dsn_flags); + DEBUG(D_deliver) debug_printf("DSN: Flags: 0x%x\n", r->dsn_flags); - if (r->pno < 0 && r->errors_to == NULL && r->dsn_flags == 0) + if (r->pno < 0 && !r->errors_to && r->dsn_flags == 0) fprintf(fp, "%s\n", r->address); else { @@ -296,7 +296,7 @@ for (int i = 0; i < recipients_count; i++) } DEBUG(D_deliver) debug_printf("DSN: **** SPOOL_OUT - " - "address: |%s| errorsto: |%s| orcpt: |%s| dsn_flags: %d\n", + "address: <%s> errorsto: <%s> orcpt: <%s> dsn_flags: 0x%x\n", r->address, r->errors_to, r->orcpt, r->dsn_flags); } |