JH/18 Bug 1867: make the fail_defer_domains option on a dnslookup router work
for missing MX records. Previously it only worked for missing A records.
-JH/19 Buf 1850: support Radius libraries that return REJECT_RC
+JH/19 Bug 1850: support Radius libraries that return REJECT_RC.
+
+JH/20 Bug 1872: Ensure that acl_smtp_notquit is run when the connection drops
+ after the data-go-ahead and data-ack. Patch from Jason Betts.
Exim version 4.87
{
log_write(L_lost_incoming_connection | L_smtp_connection, LOG_MAIN,
"%s lost while reading message data%s", smtp_get_connection_info(), s);
+smtp_notquit_exit(US"connection-lost", NULL, NULL);
return US"421 Lost incoming connection";
}
int c = (receive_getc)();
if (c != EOF) (receive_ungetc)(c); else
{
- uschar *msg = US"SMTP connection lost after final dot";
+ smtp_notquit_exit(US"connection-lost", NULL, NULL);
smtp_reply = US""; /* No attempt to send a response */
smtp_yield = FALSE; /* Nothing more on this connection */
/* Re-use the log line workspace */
sptr = 0;
- s = string_cat(s, &size, &sptr, msg);
+ s = string_cat(s, &size, &sptr, US"SMTP connection lost after final dot");
s = add_host_info_for_log(s, &size, &sptr);
s[sptr] = 0;
log_write(0, LOG_MAIN, "%s", s);
/* Call the not-QUIT ACL, if there is one, unless no reason is given. */
-if (acl_smtp_notquit != NULL && reason != NULL)
+if (acl_smtp_notquit && reason)
{
smtp_notquit_reason = reason;
- rc = acl_check(ACL_WHERE_NOTQUIT, NULL, acl_smtp_notquit, &user_msg,
- &log_msg);
- if (rc == ERROR)
+ if ((rc = acl_check(ACL_WHERE_NOTQUIT, NULL, acl_smtp_notquit, &user_msg,
+ &log_msg)) == ERROR)
log_write(0, LOG_MAIN|LOG_PANIC, "ACL for not-QUIT returned ERROR: %s",
log_msg);
}
warning, just in case. Note that string_vformat() still leaves a complete
string, even if it is incomplete. */
-if (code != NULL && defaultrespond != NULL)
+if (code && defaultrespond)
{
- if (user_msg == NULL)
+ if (user_msg)
+ smtp_respond(code, 3, TRUE, user_msg);
+ else
{
uschar buffer[128];
va_list ap;
smtp_printf("%s %s\r\n", code, buffer);
va_end(ap);
}
- else
- smtp_respond(code, 3, TRUE, user_msg);
mac_smtp_fflush();
}
}