I
I
Ilya Sevostyanov2013-08-29 08:14:49
Mozilla
Ilya Sevostyanov, 2013-08-29 08:14:49

Real-time synchronization of the IMAP directory structure in multiple Thunderbird 17.x clients

Good day to all,
Yesterday a colleague approached me with a very entertaining task :)

He asked me to pick up crutches to develop an add-on to Thunderbird that solves his problem, but I had, just the same, bathert sports interest - did this problem never arise before Thunderbird users , and there is no way to solve it.
Google has a lot of similar topics of discussion, which by and large are unanswered. I really, honestly, I swear by my mother Googled half of yesterday's working day, tried to play with options - all the same.

The essence of the question is actually in its title, but let me repeat myself and expand the “introductory” a little:
And so we have several PCs, onwhich blood from the nose needs to work with the same IMAP mailbox (In particular, Gmail, but this actually does not change the essence, we tried both “our servers” and dissidents - it does not work)
So the good old Thunderbird is used (I myself I use it, but I have a flatter user case - very suitable).

Two clients are running at the same time - new mail fails with a bang, but the directory structure, and flags read / not read, etc. they are pulled up only once when starting the client and bast, then we sit in a completely random way, after activating the special option mail.imap.use_status_for_biff which seems to be supposed to ensure synchronization at least when receiving new mail, every now and then something is partially synchronized.
I have already climbed the optional part of Thunderbird, probably the whole one, at the moment I managed to force synchronization in only two ways:
1) Restarting the client
2) In the directory properties, there is an option "Repair folder" that rebuilds the folder index * .msf file.

So I decided to open the client and see how this “fix the folder” is done there, or sniff function calls when the client starts in order to determine how synchronization occurs initially, and then if this thing has api, use it in addition.

Here. I don't really want to build a bike.
Does the habrareason have any thoughts on this matter, maybe I'm stupid and not reasonable , I 'm missing something?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Ilya Sevostyanov, 2013-08-30
@RUVATA

Thanks for the answers,
LordMerlin
I have already partially figured out the problem and it is not primarily related to obtaining data (as it turned out, everything is normal with this)
and with drawing the state of the folder in the client, i.e. the data is synced, but Thunderbird has a separate index that is dedicated to their account navigation menu tree structure, so sync doesn't initialize it rebuilding, just a call from the UI, whether it's moving from one element to another, or folding/expanding causes build a new state and draw it. And the most “tsimes” of the situation is that if the user is the “cursor” on the navigation menu directory, and will not leave it anywhere (with the cursor), or collapse to expand the account, then in the directory contents window there will be no actual structure, so no less, it will be possible to continue working with it - i.e. set flags, etc. which will go to the IMAP server with commands.
How to win - apparently in no way technically, the user is instructed to "rearrange the cursor", this problem lies in the application architecture itself.
PS: another interesting point was discovered, but it is not clear on which side the problem is: if in the ThunderBirds interface you quickly mark several messages as read or vice versa (right after click-click) - only the first mark will reach the server, or the server accepts only the first command (Based on the changes that eventually happen to the folder there). For the speed of test machines and the Internet, you can miss them more than enough.
z3apa3a,
mail.imap.use_status_for_biffI was talking about - this is just the same option, but please note that such an update comes only with the receipt of new messages, meanwhile several clients can move / delete / change flags in the absence of new incoming ones, and then you can’t synchronize them in any way .

E
Evgeny Kunitsyn, 2013-08-29
@LordMerlin

I have been using Opera Mail for some time now due to the monstrosity of the ThunderBird. It just flies. Simultaneously works with one box on 3 computers. Tags are transferred instantly.
Now I conducted an experiment with the Bird, put the mark unread in the Opera, clicked in the Bird to check the mail, the marks arrived. I did the same with another letter in the Bird, in the Opera it also changed. Everything is great.
If you do not need some serious things like plug-ins in Thunderbird, try OperaMail.

V
Vladimir Dubrovin, 2013-08-29
@z3apa3a

In the properties of all folders with which you are working together, check this box:
image

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question