ProtonMail / proton-bridge

Proton Mail Bridge application
GNU General Public License v3.0
1.11k stars 145 forks source link

Attempting to import emails larger than 30MB cause connection loss #453

Open yu-tendo opened 6 months ago

yu-tendo commented 6 months ago

Description of the problem

The email cannot be imported with the Proton Mail Bridge due to the size of the attachment. When moving the message (with Thunderbird), the following error messages are printed:

  1. failed to prepare message for import: message exceeds maximum import size of 30MB: message size exceeds limits.
  2. The Server 127.0.0.1 has interrupted the connection. The server is either down or there are network problems.

Comment

There are two different issues with these messages:

I cannot attach examples as thse are too large, but the email causing the first error message has an attachment of 21MB and saving the message with Thunderbird results in an 26-27MB large file. The message causing the second error is around 40MB. For both cases, I have several email examples. If necessary, please let me know how I can provide the example files.

I understand that there is a file size limit, but the actual limit seems smaller than 30MB -and- there should be at least an appropriate error message (and not just "(...) interrupted the connection (...)".

Version Information

Proton Mail Bridge v3.8.1 (br-187) Thunderbird 115.6.0 (64-bit) Microsoft Windows 10

LBeernaertProton commented 6 months ago

There is some variation with the actual final size of the message which is uploaded to the proton servers. Due the encryption of each body party the message can actually increase in size. Even though the initial email may be smaller than 30 MB, the final encrypted version may not.

That begin said, the connection interrupted on emails larger than 30MB will require some investigation on our end.

LBeernaertProton commented 6 months ago

Internally tracked as GODT-3177

yu-tendo commented 6 months ago

Thanks for the explanation. I figured that the the encryption causes some overhead. From my overservation, I assume the actual email size limit is around 20 MB. I think it would be suitable to adapt the error message to avoid confusion.