View Issue Details

IDProjectCategoryView StatusLast Update
0005388SOGoWeb Mailpublic2024-03-26 14:46
Reporterrof Assigned Tofrancis  
PrioritynormalSeverityminorReproducibilityhave not tried
Status assignedResolutionfixed 
OSLinux DebianOS Version10 
Product Version5.2.0 
Fixed in Version5.5.0 
Summary0005388: Loading bar when opening emails with winmail.dat
Description

We have received an email with a winmail.dat for some time. When opening the e-mail, the attachment is not displayed, but the loading bar runs permanently.
In the "sogo.log" I find the following entries for this:

Sep 07 17:51:14 sogod [909]: [RM:MailerUI] LOOKUP FAILED: UIxMailPartTNEFViewer
Sep 07 17:51:14 sogod [909]: [RM:MailerUI]   PARENT (<0x0x5610f5bd6220[WEResourceManager]:>) SAID: (null)
2021-09-07 17:51:14.333 sogod[909:909] EXCEPTION: <NSException: 0x5610fa651a40> NAME:NSInvalidArgumentException REASON:SOGoMailObject(instance) does not recognize bodyParts INFO:(null)
Sep 07 17:51:14 sogod [909]: 192.168.1.1 "GET /SOGo/so/username/Mail/0/folderPublic/folderusername_A_domain_D_de/2153/view HTTP/1.1" 501 0/0 0.438 - - 0 - 14
Additional Information

We use the official debian package and libytnef0 is also installed. Under https://aur.archlinux.org/packages/sogo/#comment-824962 I read that this still must be preloaded?! Does the startup script need to be modified maybe?

Tagstnef, winmail.dat

Activities

francis

francis

2021-09-23 12:36

administrator   ~0015486

Have you installed libytnef?

Christian Mack

Christian Mack

2021-09-23 12:42

developer   ~0015487

Last edited: 2021-09-23 12:42

We see the same errors and yes package libytnef0 is installed.

francis

francis

2021-09-23 12:51

administrator   ~0015488

Can you show me the result of

ldd /usr/sbin/sogod | grep tnef

Christian Mack

Christian Mack

2021-09-23 12:56

developer   ~0015489

Last edited: 2021-09-28 19:00

# ldd /usr/sbin/sogod | grep tnef
    libytnef.so.0 => /lib/libytnef.so.0 (0x00007ff0bbc94000)
francis

francis

2021-09-23 13:57

administrator   ~0015490

Please send me the raw source of the message in private.

francis

francis

2021-09-28 19:01

administrator   ~0015501

@rof - please try the next nightly build and let me know if it fixes your issue. If not, please send me a problematic message.

rof

rof

2021-10-04 15:48

reporter   ~0015508

Too bad, bad timing, so I am reopening the case. I had to set up a test system first and test it. The loading bar email in general seems to have a bug - I couldn't get the email to display correctly in other systems either and I think that's finished (an error message would be nice instead of the loading bar).

I have now tested several other winmail.dat and the icon for an attachment is displayed in the overview, but unfortunately I do not have access to the attachment. In the e-mail detail display it looks like there are no attachments available. I do not know if it is related?! I upload a partially anonymized email.

rof

rof

2021-10-04 15:50

reporter   ~0015509

Unfortunately, I can't upload the file because it exceeds the 2MB data limit. :(

francis

francis

2021-11-08 17:47

administrator   ~0015605

Please reopen if necessary.

rof

rof

2021-12-22 11:58

reporter   ~0015710

Last edited: 2022-02-09 15:00

Sorry for reopening the case. We have received again a winmail.dat, but it was not shown as attachment in SOGo (but in the mail overview an attachment icon is shown).
In the SOGo log it shows again the message

Dec 21 18:55:52 sogod [2088]: [RM:MailerUI] LOOKUP FAILED: UIxMailPartTNEFViewer
Dec 21 18:55:52 sogod [2088]: [RM:MailerUI]   PARENT (<0x0x55ecc323e6b0[WEResourceManager]:>) SAID: (null)

when opening the mail. Different tests (linking the "libytnef.so" or calling "LD_PRELOAD") did not lead to success. But the call of "ldd" linked to a valid /lib/libytnef.so.0

Unfortunately I am not allowed to give out the winmail.dat and I manually tried to create a valid email with tnef attachment. This is displayed correctly in Thunderbird and an online EML reader (http://eml.nepochataya.pp.ua/). In SOGo the text is parsed incorrectly (see screenshot). The attachment was taken from https://github.com/QualityUnit/TNEFDecoder/blob/master/test/testfiles/one-file.tnef and base64 encoded for the email. I do not want to exclude an error in the created e-mail and ask in this case for an example winmail.dat for testing in our system.

rof

rof

2021-12-22 12:03

reporter   ~0015711

SOGO_TNEF-Test.png (12,108 bytes)   
SOGO_TNEF-Test.png (12,108 bytes)   
rof

rof

2021-12-22 12:04

reporter   ~0015712

SOGO_TNEF-Test.eml (3,800 bytes)
rof

rof

2022-03-07 09:49

reporter   ~0015933

Unfortunately I have to open the error again, because again a winmail.dat was displayed incorrectly. Again, the attachment was displayed in the overview, but then was not accessible. It is also possible that it is not the winmail.dat, but the general mail display. I have generated an example using https://github.com/QualityUnit/TNEFDecoder/tree/master/test/testfiles (exactly MAPI_OBJECT.tnef) and hope that it corresponds to our problem and can be solved.

rof

rof

2022-03-07 09:50

reporter   ~0015934

SOGO_TNEF-Test-2.eml (852,735 bytes)
elemay

elemay

2022-03-07 13:33

reporter   ~0015935

same here

sogo 5.5.1.20220305-1.el7

ldd /usr/sbin/sogod | grep tnef
libytnef.so.0 => /lib64/libytnef.so.0 (0x00007f33f3d84000)

Mar 07 14:22:13 sogod [3288]: [RM:MailerUI] LOOKUP FAILED: UIxMailPartTNEFViewer
Mar 07 14:22:13 sogod [3288]: [RM:MailerUI] PARENT (<0x0x55b149388f00[WEResourceManager]:>) SAID: (null)

elemay

elemay

2022-03-07 13:43

reporter   ~0015937

another addition, it works on centos 8, but not on the centos 7 machine.

elemay

elemay

2022-03-07 14:10

reporter   ~0015938

i had ytnef and libytnef from epel repo installed on centos 7 box, with ytnef provided from sogo repository the error is gone. sorry for the noise.

francis

francis

2022-03-07 20:12

administrator   ~0015939

@rof The last message you attached seems partially corrupted, or we hit a limitation of the decoding library:

ERROR: invalid alloc size 628240 at ytnef.c : 529, suspected corruption (exceeded 524288 bytes)
rof

rof

2022-03-08 16:59

reporter   ~0015940

From my point of view, the mail is correct at the moment. In SOGo and another program (http://eml.nepochataya.pp.ua/) the body of the mail is displayed, and when I export the attachment and then extract it with tnef, there are no error messages etc.. But the attachment of the sample file used (https://github.com/QualityUnit/TNEFDecoder/blob/master/test/testfiles/MAPI_OBJECT.tnef) is just a cryptic binary file, but I assume that is so correct.
We use the program tnef in version 1.4.18-3 from Debian 11. When I open the mail in SOGo, I read in the log file the message "sogod[768:768] File NSConcreteMapTable.m: 570. In NSFreeMapTable Null table argument supplied".

francis

francis

2022-03-08 21:51

administrator   ~0015942

What do you see in your Web interface? This is what I see on my side:

5388.jpg (121,092 bytes)   
5388.jpg (121,092 bytes)   
rof

rof

2022-03-14 08:37

reporter   ~0015946

Sorry for my late reply, I missed the message. The display of the e-mail looks the same for me, but it still contains an attachment "Untitled_Attachment" which is not displayed.

rof

rof

2023-12-06 10:39

reporter   ~0017490

It happens from time to time that no attachment is displayed for some emails. Random checks have shown that this is due to problems with the processing of attachments within the tnef files. The above example (SOGO_TNEF-Test-2.eml) also causes the problems described in the current version. These display problems are now leading to major acceptance problems for SOGo and I hope that there will be an improvement in the short term?! Unfortunately, I am not allowed to publish the problematic e-mail, but the example demonstrates the behavior very well.

I hope you can improve the processing!

PS: Because this support case addresses the topic at the end and is still open, I didn't want to create a new one...

sebastien

sebastien

2024-03-18 14:18

administrator   ~0017659

Last edited: 2024-03-18 14:20

I have made a fix in https://github.com/Alinto/sogo/commit/e6ff9a408d94d2817ce0d9b9f078811e19ea4a39 (NB 20240319), but not sure this is the same issue.

Sebastien

rof

rof

2024-03-26 14:46

reporter   ~0017669

The problem with SOGO_TNEF-Test-2.eml could also be reproduced in a current Nightly. Sorry. :-/

Related Changesets

sogo: master d181cc4d

2021-09-28 14:57

francis


Details Diff
fix(mail): decode ms-tnef (winmail.dat) inside message/rfc822 part

Fixes 0005388
Affected Issues
0005388
mod - SoObjects/Mailer/SOGoMailBodyPart.m Diff File

sogo: master b0c5adf5

2022-01-07 16:02

francis


Details Diff
fix(mail): handle empty "Mail.Note" in ms-tnef body part

Fixes 0005388
Affected Issues
0005388
mod - SoObjects/Mailer/SOGoTNEFMailBodyPart.m Diff File

sogo: master 6d50dee0

2022-03-29 14:44

francis


Details Diff
fix(core): encode reserved HTML characters in RTF parser

Fixes 0005388
Affected Issues
0005388
mod - SoObjects/SOGo/RTFHandler.m Diff File

Issue History

Date Modified Username Field Change
2021-09-08 09:10 rof New Issue
2021-09-08 09:10 rof Tag Attached: tnef
2021-09-08 09:10 rof Tag Attached: winmail.dat
2021-09-23 12:36 francis Note Added: 0015486
2021-09-23 12:42 Christian Mack Note Added: 0015487
2021-09-23 12:42 Christian Mack Note Edited: 0015487
2021-09-23 12:51 francis Note Added: 0015488
2021-09-23 12:56 Christian Mack Note Added: 0015489
2021-09-23 13:57 francis Note Added: 0015490
2021-09-28 18:59 francis Changeset attached => sogo master d181cc4d
2021-09-28 18:59 francis Assigned To => francis
2021-09-28 18:59 francis Resolution open => fixed
2021-09-28 19:00 francis Note Edited: 0015489
2021-09-28 19:01 francis Status new => feedback
2021-09-28 19:01 francis Note Added: 0015501
2021-10-04 14:10 francis Status feedback => resolved
2021-10-04 14:10 francis Fixed in Version => 5.3.0
2021-10-04 15:48 rof Status resolved => feedback
2021-10-04 15:48 rof Resolution fixed => reopened
2021-10-04 15:48 rof Note Added: 0015508
2021-10-04 15:50 rof Note Added: 0015509
2021-10-04 15:50 rof Status feedback => assigned
2021-11-08 17:47 francis Status assigned => resolved
2021-11-08 17:47 francis Note Added: 0015605
2021-12-22 11:58 rof Status resolved => feedback
2021-12-22 11:58 rof Note Added: 0015710
2021-12-22 12:03 rof Note Added: 0015711
2021-12-22 12:03 rof File Added: SOGO_TNEF-Test.png
2021-12-22 12:03 rof Status feedback => assigned
2021-12-22 12:04 rof Note Added: 0015712
2021-12-22 12:04 rof File Added: SOGO_TNEF-Test.eml
2022-01-07 21:04 francis Changeset attached => sogo master b0c5adf5
2022-01-07 21:04 francis Resolution reopened => fixed
2022-01-07 21:04 francis Status assigned => resolved
2022-01-07 21:04 francis Fixed in Version 5.3.0 => 5.5.0
2022-02-08 15:59 francis Description Updated
2022-02-09 15:00 francis Note Edited: 0015710
2022-03-07 09:49 rof Status resolved => feedback
2022-03-07 09:49 rof Resolution fixed => reopened
2022-03-07 09:49 rof Note Added: 0015933
2022-03-07 09:50 rof Note Added: 0015934
2022-03-07 09:50 rof File Added: SOGO_TNEF-Test-2.eml
2022-03-07 09:50 rof Status feedback => assigned
2022-03-07 13:33 elemay Note Added: 0015935
2022-03-07 13:43 elemay Note Added: 0015937
2022-03-07 14:10 elemay Note Added: 0015938
2022-03-07 20:12 francis Note Added: 0015939
2022-03-08 16:59 rof Note Added: 0015940
2022-03-08 21:51 francis Note Added: 0015942
2022-03-08 21:51 francis File Added: 5388.jpg
2022-03-14 08:37 rof Note Added: 0015946
2022-03-29 14:47 francis Changeset attached => sogo master 6d50dee0
2022-03-29 14:47 francis Resolution reopened => fixed
2023-12-06 10:39 rof Note Added: 0017490
2024-03-18 14:18 sebastien Note Added: 0017659
2024-03-18 14:18 sebastien Status assigned => feedback
2024-03-18 14:20 sebastien Note Edited: 0017659
2024-03-26 14:46 rof Note Added: 0017669
2024-03-26 14:46 rof Status feedback => assigned