Closed Bug 1484400 Opened 3 years ago Closed 2 years ago

No error shown for some imap servers when appended message using literal+ is too large

Categories

(MailNews Core :: Networking: IMAP, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: gds, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0
Build ID: 20180723085701

Steps to reproduce:

Drag a large previously saved email file (e.g., 66M) from desktop to a folder for an outlook.com account.

(I think if the email is saved to thunderbird's Local Folders and then copied to an outlook folder also produces the same effect, but I haven't tried this.)


Actual results:

Email does not appear in the destination folder and no error notification occurs.
I have only personally observed this with outlook and not other IMAP servers like yahoo, gmail, dovecot, mdaemon, zimbra, aol etc.


Expected results:

Since file is larger than the maximum APPEND size for outlook, an error notification of this fact should be produced by thunderbird.

It is possible that this also occurs with other imap servers or server versions that I have not tested with.  So cannot say with certainty this is limited to outlook imap.

This was discovered while working on another APPEND related bug: See bug 1079280 comment 12 and bug 1079280 comment 16.
Like I said, other servers, except for outlook, either report the error immediately or after the whole file is uploaded so the error notification is produced, allowing tb to send the whole file. Outlook reports the error as soon as it's limit is reached and then disconnects. Tb only produces the notification after the whole file is sent, but since outlook disconnects early, no notification occurs.

The patch attachment allows tb to detect the error response in an asynchronous manner, similar to IDLE, that allows the notification to still occur even when the full file is not sent. 

The patch also adds support for capability APPENDLIMIT so that the append limit is know up front by tb and if the file is too large it just doesn't try to send it but produces an error notification instead. It also supports LITERAL- that allows the server to forbid appends using literal+ to messages larger than 4096 bytes. These new features are supported by gmail but not any of the other servers I have tested.

Note: The patch is probably not that useful. I was originally thinking the problem applied to more than just outlook. Regardless, I am attaching it for possible future reference.
This adds support for capability APPENDLIMIT and LITERAL- that I think are currently only supported by gmail. This allows the server to inform tb of the maximum message size that will be accepted for an append. LITERAL- limits appends with LITERAL+ to messages less than 4097 bytes.

The main purpose of the patch is to  allow async error notification so that the server can stop receiving appended data once its limit is reached. This will also cause tb to stop sending and produce the error notification based on the server's response. From my observations, this is only really needed for outlook imap server since others allow the full message, no matter how large, to be sent before reporting the append limit exceeded error and do not disconnect.

So, at this time, I only am posting this for documentation purposes. I am not proposing this as an essential fix.
Component: Untriaged → Networking: IMAP
Product: Thunderbird → MailNews Core
Summary: Failure notification does not occur for some imap servers when appended message using literal+ is too large → No error shown for some imap servers when appended message using literal+ is too large
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.