@@ -1693,7 +1693,7 @@ static bool ShouldParseMultipart (ImapEngine engine, CancellationToken cancellat
1693
1693
case ImapTokenType . Atom : // Note: Technically, we should never get an Atom here, but if we do, we'll treat it as a QString.
1694
1694
case ImapTokenType . QString :
1695
1695
case ImapTokenType . Literal :
1696
- if ( engine . QuirksMode == ImapQuirksMode . GMail && token . Type != ImapTokenType . Literal ) {
1696
+ if ( engine . QuirksMode is ImapQuirksMode . GMail or ImapQuirksMode . QQMail or ImapQuirksMode . Yandex && token . Type != ImapTokenType . Literal ) {
1697
1697
// Note: GMail's IMAP server implementation breaks when it encounters nested multiparts with the same
1698
1698
// boundary and returns a BODYSTRUCTURE like the example in https://github.com/jstedfast/MailKit/issues/205
1699
1699
// or like the example in https://github.com/jstedfast/MailKit/issues/777. There's also an issue with BODY
@@ -1710,6 +1710,9 @@ static bool ShouldParseMultipart (ImapEngine engine, CancellationToken cancellat
1710
1710
// If it is '(', then that would indicate the start of the Content-Type parameter list.
1711
1711
// If it is ')', then that would indicate a BODY response without a Content-Type parameter list.
1712
1712
// If it is NIL, then it would signify that the Content-Type has no parameters.
1713
+ //
1714
+ // Note: Yandex also has this problem. See https://github.com/jstedfast/MailKit/issues/1861
1715
+ // As does QQMail: https://github.com/jstedfast/MailKit/issues/1076
1713
1716
1714
1717
// Peek at the next token to see what we've got. If we get a '(' or NIL, then treat this as a multipart.
1715
1718
nextToken = engine . PeekToken ( cancellationToken ) ;
@@ -1780,7 +1783,7 @@ static async Task<bool> ShouldParseMultipartAsync (ImapEngine engine, Cancellati
1780
1783
case ImapTokenType . Atom : // Note: Technically, we should never get an Atom here, but if we do, we'll treat it as a QString.
1781
1784
case ImapTokenType . QString :
1782
1785
case ImapTokenType . Literal :
1783
- if ( engine . QuirksMode == ImapQuirksMode . GMail && token . Type != ImapTokenType . Literal ) {
1786
+ if ( engine . QuirksMode is ImapQuirksMode . GMail or ImapQuirksMode . QQMail or ImapQuirksMode . Yandex && token . Type != ImapTokenType . Literal ) {
1784
1787
// Note: GMail's IMAP server implementation breaks when it encounters nested multiparts with the same
1785
1788
// boundary and returns a BODYSTRUCTURE like the example in https://github.com/jstedfast/MailKit/issues/205
1786
1789
// or like the example in https://github.com/jstedfast/MailKit/issues/777. There's also an issue with BODY
@@ -1797,6 +1800,9 @@ static async Task<bool> ShouldParseMultipartAsync (ImapEngine engine, Cancellati
1797
1800
// If it is '(', then that would indicate the start of the Content-Type parameter list.
1798
1801
// If it is ')', then that would indicate a BODY response without a Content-Type parameter list.
1799
1802
// If it is NIL, then it would signify that the Content-Type has no parameters.
1803
+ //
1804
+ // Note: Yandex also has this problem. See https://github.com/jstedfast/MailKit/issues/1861
1805
+ // As does QQMail: https://github.com/jstedfast/MailKit/issues/1076
1800
1806
1801
1807
// Peek at the next token to see what we've got. If we get a '(' or NIL, then treat this as a multipart.
1802
1808
nextToken = await engine . PeekTokenAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
0 commit comments