Avoid trying to send smtp repoonse for non-smtp input, on datafile close error
authorJeremy Harris <jgh146exb@wizmail.org>
Fri, 1 Dec 2023 15:44:57 +0000 (15:44 +0000)
committerJeremy Harris <jgh146exb@wizmail.org>
Fri, 1 Dec 2023 15:44:57 +0000 (15:44 +0000)
Broken-by: f70940c9489d
src/src/receive.c

index a459061ef4b6bfb2fbaf994e06b3585465e3ff06..c4b80c2367e9a10070de174a44ef249324fe45de 100644 (file)
@@ -4425,8 +4425,8 @@ if (spool_data_file && cutthrough_done == NOT_TRIED)
     Uunlink(spool_fname(US"input", message_subdir, message_id, US"-H"));
     Uunlink(spool_fname(US"msglog", message_subdir, message_id, US""));
 
-    /* Claim a data ACL temp-reject, just to get reject logging and resposponse */
-    smtp_handle_acl_fail(ACL_WHERE_DATA, rc, NULL, log_msg);
+    /* Claim a data ACL temp-reject, just to get reject logging and response */
+    if (smtp_input) smtp_handle_acl_fail(ACL_WHERE_DATA, rc, NULL, log_msg);
     smtp_reply = US"";         /* Indicate reply already sent */
 
     message_id[0] = 0;         /* no message accepted */