summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Hazel <ph10@hermes.cam.ac.uk>2005-01-27 15:57:51 +0000
committerPhilip Hazel <ph10@hermes.cam.ac.uk>2005-01-27 15:57:51 +0000
commit04f7d5b98fab7d9bc5026b3095fc32f69dc6eac3 (patch)
treed1bc3828fdeb7613d887ee5166c06b44db5e62bd
parentd17610eb5e5c37609dac69f50986fe0943edf135 (diff)
log_message on a "discard" verb was not working for the DATA or non-SMTP
ACLs.
-rw-r--r--doc/doc-txt/ChangeLog6
-rw-r--r--src/src/receive.c8
2 files changed, 11 insertions, 3 deletions
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index eaec31c78..904df107a 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -1,4 +1,4 @@
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.76 2005/01/27 15:00:39 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.77 2005/01/27 15:57:51 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
@@ -361,6 +361,10 @@ Exim version 4.50
76. Arrange for output from Perl's "warn" command to be written to Exim's main
log by default. The user can override this with suitable Perl magic.
+77. The use of log_message on a "discard" ACL verb, which is supposed to add to
+ the log message when discard triggers, was not working for the DATA ACL or
+ for the non-SMTP ACL.
+
----------------------------------------------------
See the note above about the 4.44 and 4.50 releases.
diff --git a/src/src/receive.c b/src/src/receive.c
index d95808be3..ccd90b8a7 100644
--- a/src/src/receive.c
+++ b/src/src/receive.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/receive.c,v 1.9 2005/01/04 10:00:42 ph10 Exp $ */
+/* $Cambridge: exim/src/src/receive.c,v 1.10 2005/01/27 15:57:51 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -1115,6 +1115,7 @@ BOOL yield = FALSE;
BOOL resents_exist = FALSE;
uschar *resent_prefix = US"";
uschar *blackholed_by = NULL;
+uschar *blackhole_log_msg = US"";
flock_t lock_data;
error_block *bad_addresses = NULL;
@@ -2869,6 +2870,8 @@ else
{
recipients_count = 0;
blackholed_by = US"DATA ACL";
+ if (log_msg != NULL)
+ blackhole_log_msg = string_sprintf(": %s", log_msg);
}
else if (rc != OK)
{
@@ -2896,6 +2899,7 @@ else
{
recipients_count = 0;
blackholed_by = US"non-SMTP ACL";
+ if (log_msg != NULL) blackhole_log_msg = string_sprintf(": %s", log_msg);
}
else if (rc != OK)
{
@@ -3429,7 +3433,7 @@ if (blackholed_by != NULL)
uschar *detail = (local_scan_data != NULL)?
string_printing(local_scan_data) :
string_sprintf("(%s discarded recipients)", blackholed_by);
- log_write(0, LOG_MAIN, "=> blackhole %s", detail);
+ log_write(0, LOG_MAIN, "=> blackhole %s%s", detail, blackhole_log_msg);
log_write(0, LOG_MAIN, "Completed");
message_id[0] = 0;
}