From 6f0c431a792c79870266913600a71f3be21ee620 Mon Sep 17 00:00:00 2001 From: Phil Pennock Date: Sat, 22 Jan 2011 18:33:45 -0500 Subject: [PATCH] Bugzilla 1041: pull patch id=425, DCC fixes. DCC return codes were not always correct. Patch from DCC code maintainer, Wolfgang Breyha. --- src/src/dcc.c | 3 ++- src/src/receive.c | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/src/dcc.c b/src/src/dcc.c index ff760bcf6..6de5102d0 100644 --- a/src/src/dcc.c +++ b/src/src/dcc.c @@ -512,7 +512,8 @@ int dcc_process(uschar **listptr) { debug_printf("Before returning to exim main process:\nreturn_text = %s - retval = %d\ndcc_result = %s\n", dcc_return_text, retval, dcc_result); (void)fclose(data_file); - return retval; + dcc_rc = retval; + return dcc_rc; } #endif diff --git a/src/src/receive.c b/src/src/receive.c index c4fb31ea7..914b1d281 100644 --- a/src/src/receive.c +++ b/src/src/receive.c @@ -1101,6 +1101,9 @@ if (mbox_file == NULL) { "acl_smtp_mime: error while creating mbox spool file, message temporarily rejected."); Uunlink(spool_name); unspool_mbox(); +#ifdef EXPERIMENTAL_DCC + dcc_ok = 0; +#endif smtp_respond(US"451", 3, TRUE, US"temporary local problem"); message_id[0] = 0; /* Indicate no message accepted */ *smtp_reply_ptr = US""; /* Indicate reply already sent */ @@ -1180,6 +1183,9 @@ else if (rc != OK) { Uunlink(spool_name); unspool_mbox(); +#ifdef EXPERIMENTAL_DCC + dcc_ok = 0; +#endif if (smtp_handle_acl_fail(ACL_WHERE_MIME, rc, user_msg, log_msg) != 0) *smtp_yield_ptr = FALSE; /* No more messsages after dropped connection */ *smtp_reply_ptr = US""; /* Indicate reply already sent */ @@ -3091,6 +3097,9 @@ else Uunlink(spool_name); #ifdef WITH_CONTENT_SCAN unspool_mbox(); +#endif +#ifdef EXPERIMENTAL_DCC + dcc_ok = 0; #endif if (smtp_handle_acl_fail(ACL_WHERE_DATA, rc, user_msg, log_msg) != 0) smtp_yield = FALSE; /* No more messsages after dropped connection */ @@ -3130,6 +3139,9 @@ else Uunlink(spool_name); #ifdef WITH_CONTENT_SCAN unspool_mbox(); +#endif +#ifdef EXPERIMENTAL_DCC + dcc_ok = 0; #endif /* The ACL can specify where rejections are to be logged, possibly nowhere. The default is main and reject logs. */ -- 2.25.1