summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/src/daemon.c19
-rw-r--r--src/src/functions.h1
-rw-r--r--src/src/smtp_in.c14
3 files changed, 13 insertions, 21 deletions
diff --git a/src/src/daemon.c b/src/src/daemon.c
index 476ed296b..4a89afe74 100644
--- a/src/src/daemon.c
+++ b/src/src/daemon.c
@@ -563,18 +563,13 @@ if (pid == 0)
/* Reclaim up the store used in accepting this message */
- return_path = sender_address = NULL;
- authenticated_sender = NULL;
- sending_ip_address = NULL;
- deliver_host_address = deliver_host =
- deliver_domain_orig = deliver_localpart_orig = NULL;
- dnslist_domain = dnslist_matched = NULL;
- callout_address = NULL;
-#ifndef DISABLE_DKIM
- dkim_cur_signer = NULL;
-#endif
- acl_var_m = NULL;
- store_reset(reset_point);
+ {
+ int r = receive_messagecount;
+ BOOL q = queue_only_policy;
+ smtp_reset(reset_point);
+ queue_only_policy = q;
+ receive_messagecount = r;
+ }
/* If queue_only is set or if there are too many incoming connections in
existence, session_local_queue_only will be TRUE. If it is not, check
diff --git a/src/src/functions.h b/src/src/functions.h
index 1f201fc69..4e60ec2c8 100644
--- a/src/src/functions.h
+++ b/src/src/functions.h
@@ -442,6 +442,7 @@ extern void smtp_log_no_mail(void);
extern void smtp_message_code(uschar **, int *, uschar **, uschar **, BOOL);
extern void smtp_proxy_tls(uschar *, size_t, int *, int);
extern BOOL smtp_read_response(smtp_inblock *, uschar *, int, int, int);
+extern void smtp_reset(void *);
extern void smtp_respond(uschar *, int, BOOL, uschar *);
extern void smtp_notquit_exit(uschar *, uschar *, uschar *, ...);
extern void smtp_port_for_connect(host_item *, int);
diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c
index a0cc581c2..a229721cf 100644
--- a/src/src/smtp_in.c
+++ b/src/src/smtp_in.c
@@ -1947,13 +1947,13 @@ return TRUE;
*************************************************/
/* This function is called whenever the SMTP session is reset from
-within either of the setup functions.
+within either of the setup functions; also from the daemon loop.
Argument: the stacking pool storage reset point
Returns: nothing
*/
-static void
+void
smtp_reset(void *reset_point)
{
recipients_list = NULL;
@@ -1997,9 +1997,8 @@ bmi_verdicts = NULL;
#endif
dnslist_domain = dnslist_matched = NULL;
#ifndef DISABLE_DKIM
-dkim_signers = NULL;
-dkim_disable_verify = FALSE;
-dkim_collect_input = FALSE;
+dkim_cur_signer = dkim_signers = NULL;
+dkim_disable_verify = dkim_collect_input = FALSE;
#endif
dsn_ret = 0;
dsn_envid = NULL;
@@ -2008,10 +2007,7 @@ deliver_host = deliver_host_address = NULL; /* Can be set by ACL */
prdr_requested = FALSE;
#endif
#ifdef SUPPORT_SPF
-spf_header_comment = NULL;
-spf_received = NULL;
-spf_result = NULL;
-spf_smtp_comment = NULL;
+spf_header_comment = spf_received = spf_result = spf_smtp_comment = NULL;
#endif
#ifdef SUPPORT_I18N
message_smtputf8 = FALSE;