ProtonMail / proton-bridge

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

Header parsing error (RFC5322) prevents importing of emails #449

Closed yu-tendo closed 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 a parsing error of the header. When moving the message (with Thunderbird), the following error messages is printed:

  1. invalid rfc5322 message: failed to parse From header: [Error offset=84]: expected FWS or comment for CFWS. (see attached example, issue-1.txt)

Comment

I am not sure if it is possible to fix this issue, as it might be the case that the e-mail is simply faulty (i.e., does not conform with rfc5322, and the respective issue cannot be corrected automatically). However, identifying manually the faulty e-Mails while actually moving thousands of e-Mails is very time-consuming. Thus, I would expect that at least the email-moving process is not interrupted and the faulty emails are skipped. Assuming the bridge cannot handle the parsing issue, I suggest that a respective FAQ entry (or similar) is created covering an explanation of the issue and how to potentially manually fix this issue (otherwise users will keep opening new issues).

Version Information

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

(Potentially) Related Issues

Issue 415 Issue 446

File Attachments

issue-1.txt

LBeernaertProton commented 6 months ago

Internally tracked as GODT-3181

LBeernaertProton commented 6 months ago

I looked into this and according to the rfc5322 the address in this message does not appear to be valid.

To fix this you should change "Webmaster|CoH|.:Clan"@linux.site:. <T.Sztyler@gmail.com> to "Webmaster|CoH|.:Clan@linux.site:." <T.Sztyler@gmail.com> .

The : character can only be part of group definitions, which is not the case for this particular address.