From 87e80be2d16cf22e31f20dcdcab4c96f9709dc16 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Sun, 10 Nov 2019 18:11:49 -0500 Subject: [PATCH] Bug 1079280 - Don't transmit email when imap append response is bad. This only applies to non-literal+ appends. Bad response typically occurs when {size} parameter of append command is larger than server can accept. This prevents TB from sending megabytes of data to a server that has already rejected it. Tag #1273 --- mailnews/imap/src/nsImapProtocol.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mailnews/imap/src/nsImapProtocol.cpp b/mailnews/imap/src/nsImapProtocol.cpp index dee4ff1698..1d0c98d48b 100644 --- a/mailnews/imap/src/nsImapProtocol.cpp +++ b/mailnews/imap/src/nsImapProtocol.cpp @@ -6160,7 +6160,11 @@ void nsImapProtocol::UploadMessageFromFile (nsIFile* file, if (NS_FAILED(rv)) goto done; if (!useLiteralPlus) - ParseIMAPandCheckForNewMail(); + { + ParseIMAPandCheckForNewMail(); + if (!GetServerStateParser().LastCommandSuccessful()) + goto done; + } totalSize = fileSize; readCount = 0;