Accessing inbox via imap (Apple Mail) and Kopano webapp out of sync ?!?
-
Hi there,
running meanwhile kopano core 8.4.90 we have a very weird problem:
I am running zarafa/kopano since years and migrated several times amongst versions and finally from zarafa to kopano on the same database. After a crash 6 weeks ago with a corrupt database we rebuilt the kopano environment based on a restored kopano db status some weeks older from scratch (deleted all mysql db and then restored from backup). However, after some weeks of operations now, we have a very irritating situation:
-
New incoming mails are correctly shown in all details in Kopano webapp
-
Some e-mails however in inbox, when viewed with Apple Mail are either corrupt, displayed as eg
ÿÛC ÿÝÿÚ?õãkÔ
ÕËîï]*ZK(ÙY:®4mþTÏNµâòÁÖâYÎàó÷5t½¬,¥{~tÑnàNyÁ¬©æK{J2Aôõ5§)3gUî EXßå= eéòÉ,ÙJJÕ´¸E×è§bÄ©!Iz»RpÁS5_e¾L¸ùÏ_¤)#&
OOþµk#4t÷"9-ã ßÚ£³í¤ýÙàsÅd:Í óc$õt±=¸ÇÍR½Î
=R«NâU8Ús¾0Öûܲ¬¤/;ÀAÀïõȺüÞ¦¹Õ»(« YWÑÌ!JtD>QóQ%Åg"KSHeº¸Wn«ÈÇZµmo$8`/CëZPBHƱ¨åYvsÀÕF:ßK®¥Àð@â m¬²JGßÆie»ØïUâY/F1¹õô¹tx¿Å²B7j(@SÃ5#Àb
áGi-¦ý»Z\¦rå»fFê½)ö²íR\ó+V{rïIaYÉÓm2¤ed_C$ª£kBæåAvãÞª?jêeàãÒY¡¼7Èü9¥ìÉ3³Ê¥àÕ#O¼zÔ.ÎèëRÖ8Â2LyÇ´bk®.ü¥qôU¢õê+6²|·ÁñíR»p2kC^Rb¢ð>îWÒ«G*Û©·µD¢A4gæ9ã5¬rÈÏÉé\¥ÞÃs/¸ühÇt;¥JÖ°GQÜ[Å5ºy¤OS%-Ö<Çð©Ö]Ѳ8ÆjEa’×,õSÇzêÐ$iÏrز¤ÔòXº¶Í·}ª[+,²/Îݪô?and without any structure/header/whatsoever typical for mail
- OR: Some mails are shown in Apple Mail with the correct subject, but then with wrong body belonging to a completely different mail, which is even in parts from OTHER mailboxes.
I first thought that this is a problem of the local Apple Mail database and deleted it/rebuild it from scratch. No change, the same mails are wrong again.
So … I have a different behavior when accessing the mailbox/datastore from a user via webapp or via imap and (obviously?) and imap web app view which is not in sync.
Does anybody has an idea how to analyze that or - even better - to get this repaired/resynced?
Any advice/help highly appreciated …
Br br
-
-
Hi @bringha ,
have you hardlinked the files in ´/var/lib/kopano/attachments´ in the past? When having imap enabled for a user the rfc822 mail will be stored in the attachment directory so that the gateway can deliver it directly to the client instead regenerating it from the mapi data.
-
Hm … not consciously - is this happening when you pull out the data out of the database into the attachment directory - which has been done at some point in one of the numerous migrations - ?
How to find out and - if double usage of inodes should be there - correct then? Is it possible to rebuild somehow the attachment directory?
Br br
-
Hi @bringha ,
if you’d hardlinked you attachments, you’d (hopefully) remember.
@bringha said in Accessing inbox via imap (Apple Mail) and Kopano webapp out of sync ?!?:
Is it possible to rebuild somehow the attachment directory
with the exception of these rfc822 messages everything is stored only once, so there is no real use of “rebuilding” the attachment directory (since for all the regular attachments there is nothing to rebuild from). As far as I remember there is a mapi attribute (PR_EC_IMAP_EMAIL) that stores a relation to the message. deleting the relation should also delete the object from the disk (which means you could then theoretically run the optimize-imap script again).
-
Sorry that I need to come back to this again
With the help of the different cleanup scripts db-remove-orphaned-attachements and also the discussed and also removing unconnected files in the attachment directory with remove-orphaned-attachement-files it seems that at least I have no mis-connected mail to content on IMAP level anymore.
However, the situation is still not ok: despite having executed optimize-imap.py, my imap based client does NOT contain all mails which are eg in the inbox or sent folder of my web app client.
Is there any hint how to rebuild the relation (the PR_EC_IMAP_EMAIL) from scratch to all mails in the database? Or did I misunderstood something here …
Any hint highly appreciated …
Br br