What was broken QUIT became a line of the message
When the process was stopped during DATA, for example by SIGTERM, the destructor closed the connection with quit(). The server took QUIT as another line of the email and never replied, and the connection only ended when it timed out with a 421.
How we fixed it quit() checks the connection state
The SMTP class remembers the last command it sent, and in the DATA state quit() just closes the connection without sending QUIT. The testQuitDuringData test checks that no QUIT goes out and the connection is closed.
#3362
What was broken Signed emails rejected for bare LF
openssl_pkcs7_sign() returns its headers and body with bare LF line breaks, and createBody() copied them as they were. Every S/MIME signed email went out with bare LFs, and servers that enforce RFC 5321 line endings rejected it with 550 5.6.11 SMTPSEND.BareLinefeedsAreIllegal.
How we fixed it OpenSSL output goes through normalizeBreaks()
The headers and body from OpenSSL now go through the existing normalizeBreaks(), as DKIM_Sign() already does. The signature still verifies, because S/MIME canonicalises to CRLF before digesting, and testSigning() checks that the message has no bare LFs.
#3358
What was broken A long address list on one line
addrAppend() put every address on a single line. A large To, Cc or Bcc list could go past the 998-character limit for a header line.
How we fixed it The header folds between addresses
addrAppend() moves the next address to a new line when it would no longer fit, and short lists come out as before. A test with a hundred recipients checks every line's length and that unfolding gives back the original list.
#3361