Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Linagora] Sent mail appears in base64 #5319

Open
simonelbaz opened this issue Nov 7, 2024 · 15 comments
Open

[Linagora] Sent mail appears in base64 #5319

simonelbaz opened this issue Nov 7, 2024 · 15 comments
Assignees
Labels
bug critical Priority of a bug - QA priorization tool timebox

Comments

@simonelbaz
Copy link
Member

Hi James team,

A sent email appears in base64 in Thunderbird 128.4.0

james_sent_mail

Kind regards

@Arsnael
Copy link
Member

Arsnael commented Nov 7, 2024

Hi @simonelbaz

Can you provide us with the full eml of the message if possible? Thanks !

@simonelbaz simonelbaz reopened this Nov 7, 2024
@simonelbaz
Copy link
Member Author

simonelbaz commented Nov 7, 2024

Here it is:

mail.zip

PS: sorry i have mistakenly closed/reopened the issue

@Arsnael
Copy link
Member

Arsnael commented Nov 7, 2024

PS: sorry i have mistakenly closed/reopened the issue

No worries :)

Was the eml like that? it is clearly incomplete. Can we get the full version of it instead? If info are sensitive send it by mail instead!

On which platform? linagora.com on your personal account?

@simonelbaz
Copy link
Member Author

Getting the eml from TB, truncates it.

From Tmail web, the mail is correctly displayed and full EML available:

mail_eml_tmail.zip

@chibenwa
Copy link
Member

chibenwa commented Nov 7, 2024

Hello.

Could it be that IMAP FETCH could ommit part of the content?

We would need to further test S3BlobStoreDAO::readBytes that is exercised upon IMAP FETCH.

We could try to reproduce with and intergation test in the distributed tests as well...

(looks like a 1 time in a million concurrency bug...)

@chibenwa chibenwa added bug critical Priority of a bug - QA priorization tool labels Nov 7, 2024
@chibenwa
Copy link
Member

For the record related CNB defect https://smartsla.08000linux.com/requests/3828

Email written correctly in DB.

Likely EmailSubmission/set fucked up the read and did thus send partial data.

I'd thus tend to blame the blob store. Could it be that it misses bytes parts when reading data from the Object store?

Context: AESBlobStore + S3

@Arsnael Arsnael added the timebox label Dec 2, 2024
@Arsnael
Copy link
Member

Arsnael commented Dec 2, 2024

@chibenwa : from what I can read again on smartsla ticket that you linked, was the issue the images with GMail and was the fix setting up public assets for cnb perhaps?

I don't think it's related to this issue though, as Simon seems to get a truncated base64 email on Thunderbird

@Arsnael Arsnael self-assigned this Dec 2, 2024
@Arsnael
Copy link
Member

Arsnael commented Dec 2, 2024

@simonelbaz sorry to come back to it so late...

Checking the full eml again, and trying to navigate the logs a bit from that day, it looks like you are sending email with Thunderbird. Can you confirm this is correct?

Then there is nothing to do with JMAP and EmailSubmission/set then.

Can we ask as well to Yassin Benhaddou that you sent email to and is part of Linagora, if he can read the mail fully with Thunderbird, or if it's the same issue as you? Just to make sure

@Arsnael
Copy link
Member

Arsnael commented Dec 2, 2024

If it's thunderbird as I suspect I would tend to think something went wrong with the APPEND IMAP command.

I dont see much anything wrong around that APPEND in the logs, except that... there was an IMAP LOGOUT command issued right after. Maybe that affected something?

If can read the message vi TMail though, it would tend to mean that server-side the message has been stored successfully. Maybe Thunderbird messed up his sync here?

@simonelbaz did you try to right click on your Sent folder on Thunderbird, select properties, and on the General Information tab you will see a button called 'Repair Folder'. If you didn't can you try to click on it? That normally should rebuild the folder index and force TB to refetch the message metadat and content from the tmail server.

If after that you can read that mail normally on TB, then it means TB messed up somehow on its side when appending the message to sent mailbox. If not... we need to dig more.

@chibenwa
Copy link
Member

chibenwa commented Dec 2, 2024

@chibenwa : from what I can read again on smartsla ticket that you linked, was the issue the images with GMail and was the fix setting up public assets for cnb perhaps?

Yes unrelated

@chibenwa
Copy link
Member

chibenwa commented Dec 2, 2024

If it's thunderbird as I suspect I would tend to think something went wrong with the APPEND IMAP command.

No. If it was the case data would be stored screwed, and displayed screwed in TMail.

=> 100% it is FETCH.

@chibenwa
Copy link
Member

chibenwa commented Dec 2, 2024

If after that you can read that mail normally on TB, then it means TB messed up somehow on its side when appending the message to sent mailbox. If not... we need to dig more.

I'd like to be sure FETCH is not screwed, thus I would like the team to do exploratory tests on the topic just in case.

@Arsnael
Copy link
Member

Arsnael commented Dec 2, 2024

Yes sorry the fetch after the append, yes, didn't express myself correctly here.

The fetch could have messed up on TMail side but also TB could have messed up or maybe there was a connection issue.

Concerned fetch on the logs:

log-fetch-simon

I'd like to be sure FETCH is not screwed, thus I would like the team to do exploratory tests on the topic just in case.

Well I do understand the concern and will try to check it out

@chibenwa
Copy link
Member

chibenwa commented Dec 2, 2024

We shall do size verifications in SimpleMailboxMessage

(we have the expected message size as saved in the DB as well as the actual content: we could easily checked that the two are alined and WARN if it is not the case. I could help rouling out the eventuality of an issue within the S3BlobStoreDAO)

@chibenwa
Copy link
Member

My feeling is that it is TB side.

Let's keep this in mind and investigate if reproduced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug critical Priority of a bug - QA priorization tool timebox
Projects
None yet
Development

No branches or pull requests

3 participants