summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2015-12-17 23:22:09 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2015-12-17 23:25:56 +0000
commitce3258931d05becb2c87f17d80ee7c4b01f5a55a (patch)
treea8572e7e3de55fee973707fe55d35d71bd7c4047 /src
parentf2f2c91b11a6a740b5683ea15ef7e6240b37f086 (diff)
Fix hosts_connection_nolog ensuring that sender_host_cache is not
incorrectly filled in by the daemon, where the sender_host will be varying.
Diffstat (limited to 'src')
-rw-r--r--src/src/daemon.c1
-rw-r--r--src/src/exim.c2
-rw-r--r--src/src/smtp_in.c2
3 files changed, 3 insertions, 2 deletions
diff --git a/src/src/daemon.c b/src/src/daemon.c
index 65195ccd1..24874c374 100644
--- a/src/src/daemon.c
+++ b/src/src/daemon.c
@@ -341,6 +341,7 @@ arrange to unset the selector in the subprocess. */
if (LOGGING(smtp_connection))
{
uschar *list = hosts_connection_nolog;
+ memset(sender_host_cache, 0, sizeof(sender_host_cache));
if (list != NULL && verify_check_host(&list) == OK)
save_log_selector &= ~L_smtp_connection;
else
diff --git a/src/src/exim.c b/src/src/exim.c
index 9e4dafe2f..f8cfda8a8 100644
--- a/src/src/exim.c
+++ b/src/src/exim.c
@@ -5051,6 +5051,7 @@ if (host_checking)
"**** This is not for real!\n\n",
sender_host_address);
+ memset(sender_host_cache, 0, sizeof(sender_host_cache));
if (verify_check_host(&hosts_connection_nolog) == OK)
BIT_CLEAR(log_selector, log_selector_size, Li_smtp_connection);
log_write(L_smtp_connection, LOG_MAIN, "%s", smtp_get_connection_info());
@@ -5225,6 +5226,7 @@ if (smtp_input)
{
smtp_in = stdin;
smtp_out = stdout;
+ memset(sender_host_cache, 0, sizeof(sender_host_cache));
if (verify_check_host(&hosts_connection_nolog) == OK)
BIT_CLEAR(log_selector, log_selector_size, Li_smtp_connection);
log_write(L_smtp_connection, LOG_MAIN, "%s", smtp_get_connection_info());
diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c
index 3fce125d3..b48e436e3 100644
--- a/src/src/smtp_in.c
+++ b/src/src/smtp_in.c
@@ -1866,8 +1866,6 @@ pipelining_enable = TRUE;
sync_cmd_limit = NON_SYNC_CMD_NON_PIPELINING;
smtp_exit_function_called = FALSE; /* For avoiding loop in not-quit exit */
-memset(sender_host_cache, 0, sizeof(sender_host_cache));
-
/* If receiving by -bs from a trusted user, or testing with -bh, we allow
authentication settings from -oMaa to remain in force. */