Reject "dot, LF" as ending data phase. Bug 3063
[exim.git] / src / src / smtp_in.c
index e19c86ff87145062554df64c0d473d09f66a461b..aeaffeb37ff702b32ba49f415fdbb7c74c49821d 100644 (file)
@@ -5105,15 +5105,18 @@ while (done <= 0)
        }
 
       if (chunking_state > CHUNKING_OFFERED)
-       rc = OK;                        /* No predata ACL or go-ahead output for BDAT */
+       rc = OK;        /* There is no predata ACL or go-ahead output for BDAT */
       else
        {
-       /* If there is an ACL, re-check the synchronization afterwards, since the
-       ACL may have delayed.  To handle cutthrough delivery enforce a dummy call
-       to get the DATA command sent. */
+       /* If there is a predata-ACL, re-check the synchronization afterwards,
+       since the ACL may have delayed.  To handle cutthrough delivery enforce a
+       dummy call to get the DATA command sent. */
 
        if (!acl_smtp_predata && cutthrough.cctx.sock < 0)
+         {
+         if (!check_sync()) goto SYNC_FAILURE;
          rc = OK;
+         }
        else
          {
          uschar * acl = acl_smtp_predata ? acl_smtp_predata : US"accept";