From: Philip Hazel Date: Fri, 7 Jul 2006 13:36:33 +0000 (+0000) Subject: Log lines flagged for both main and reject logs were not written to X-Git-Tag: exim-4_63~22 X-Git-Url: https://git.exim.org/users/jgh/exim.git/commitdiff_plain/a7d7aa5833d855cf85d3b77065e49a0fdda57c22 Log lines flagged for both main and reject logs were not written to syslog at all when both write_rejectlog and syslog_duplication were false. --- diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 652d4c17a..20eb6f83c 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.369 2006/07/06 14:28:03 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.370 2006/07/07 13:36:33 ph10 Exp $ Change log file for Exim from version 4.21 ------------------------------------------- @@ -78,6 +78,11 @@ PH/11 Applied patch from Arkadiusz Miskiewicz to apply a timeout to read PH/12 Applied patch from Magnus Holmgren to include the "h" tag in Domain Keys signatures. +PH/13 If write_rejectlog was set false when logging was sent to syslog with + syslog_duplication set false, log lines that would normally be written + both the the main log and to the reject log were not written to syslog at + all. + Exim version 4.62 ----------------- diff --git a/src/src/log.c b/src/src/log.c index d5e89f2cf..23583ee6b 100644 --- a/src/src/log.c +++ b/src/src/log.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/log.c,v 1.9 2006/02/13 11:28:56 ph10 Exp $ */ +/* $Cambridge: exim/src/src/log.c,v 1.10 2006/07/07 13:36:34 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -724,6 +724,10 @@ if (disable_logging) return; } +/* Handle disabled reject log */ + +if (!write_rejectlog) flags &= ~LOG_REJECT; + /* Create the main message in the log buffer, including the message id except for the process log and when called by a utility. */ @@ -858,11 +862,12 @@ if ((flags & LOG_MAIN) != 0 && } } -/* Handle the log for rejected messages. This can be globally disabled. If -there are any header lines (i.e. if the rejection is happening after the DATA -phase), log the recipients and the headers. */ +/* Handle the log for rejected messages. This can be globally disabled, in +which case the flags are altered above. If there are any header lines (i.e. if +the rejection is happening after the DATA phase), log the recipients and the +headers. */ -if (write_rejectlog && (flags & LOG_REJECT) != 0) +if ((flags & LOG_REJECT) != 0) { header_line *h;