diff -urN ../exim-4.87.orig/src/deliver.c ./src/deliver.c --- ../exim-4.87.orig/src/deliver.c 2016-04-02 21:24:15.000000000 +0200 +++ ./src/deliver.c 2016-08-03 00:07:08.763548000 +0200 @@ -8065,7 +8065,7 @@ #ifdef SUPPORT_TLS if (!regex_STARTTLS) regex_STARTTLS = - regex_must_compile(US"\\n250[\\s\\-]STARTTLS(\\s|\\n|$)", FALSE, TRUE); + regex_must_compile(US"(^|\\n)250[\\s\\-]STARTTLS(\\s|\\n|$)", FALSE, TRUE); #endif #ifndef DISABLE_PRDR diff -urN ../exim-4.87.orig/src/verify.c ./src/verify.c --- ../exim-4.87.orig/src/verify.c 2016-04-02 21:24:15.000000000 +0200 +++ ./src/verify.c 2016-08-03 00:07:14.435680000 +0200 @@ -741,7 +741,7 @@ if (esmtp && !suppress_tls && tls_out.active < 0) { if (regex_STARTTLS == NULL) regex_STARTTLS = - regex_must_compile(US"\\n250[\\s\\-]STARTTLS(\\s|\\n|$)", FALSE, TRUE); + regex_must_compile(US"(^|\\n)250[\\s\\-]STARTTLS(\\s|\\n|$)", FALSE, TRUE); tls_offered = pcre_exec(regex_STARTTLS, NULL, CS responsebuffer, Ustrlen(responsebuffer), 0, PCRE_EOPT, NULL, 0) >= 0;