[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problems with disconnected IMAP in kontact 16.04



On Mon, Jul 18, 2016 at 5:36 AM, Maximiliano Curia <maxy@debian.org> wrote:
> ¡Hola Adriano!
>
> El 2016-07-17 a las 20:25 -0300, Adriano Vilela Barbosa escribió:
>>
>> On Sun, Jul 17, 2016 at 6:36 PM, Maximiliano Curia
>> <maxy@gnuservers.com.ar> wrote:
>>>
>>> It takes a while till akonadi updates the state of all the folders, and
>>> has a valid cache for each mail, but once everything is downloaded the
>>> offline mode works as expected, at least, it works here.
>
>
>> Well, this is what I expected to happen, but after syncing all the folders
>> a couple of times I still don't have all my emails downloaded. In older
>> versions of kmail, when creating a disconnected IMAP resource, kmail would
>> take a couple of hours downloading all the emails from the server when
>> syncing for the first time. After that, additional syncs would take just a
>> short time. However, in my current case, kmail says all folders are synced
>> 100% and yet I can't access my emails after going offline. Is this normal
>> behavior?
>
>
> I'm not sure about keeping all mails, for me, it keeps the ones in the
> folders that I use, the messages tagged important and the new ones.
>
> Just browsing the interface I noticed that there are some related options in
> the folder properties that have no configurable global or per account value:
> Retrieval -> Retrieval Options:
>   Always retrieve full messages/Retrieve messages on demand
>   Keep messages bodies locally for:
>
> And the current behavior seems to be consistent with what I expect for
> "Retrieve messages on demand", so maybe you'll need to set "Always retrieve
> full messages" in the folders that you want in offline mode (you'll still
> need to wait for a synchronization cycle for this to take effect). I haven't
> checked the code to see if this is really what you need.
>
> But, if this makes a difference for you, maybe you could report a bug
> upstream [1] about the missing global configuration option. Also the text
> for the account configuration is misleading, as it's definetly not
> downloading all the messages, it seems to me that it's only enabling the use
> of the cached data in offline mode.
>
> [1]: https://bugs.kde.org/
>
>>> Authoritative data storage    -> akonadi <- akonadi backend (cached data,
>>> local metadata) (mail server, ldap, etc)            |
>>> \> akonadi clients (kmail, etc)
>>>
>
>> Sorry for my ignorance, but I don't follow. The blog entry above seems to
>> imply that the actual email messages are stored only on the IMAP server, not
>> in the local machine. Isn't the whole point of disconnected IMAP to have a
>> local copy of all the email messages in the IMAP server?
>
>
> That's the difference of authoritative data and cached data. The imap server
> has the authoritative data, your actual email messages, akonadi stores what
> it needs to keep locally in the akonadi backend. The cache could contain a
> full copy of all the mails, or just the index information (used in mail
> search), or the mails that are less than a month old, or nothing at all.
> This is way more flexible than duplicating all the mails. But it's also way
> harder to do right. And your currently hitting an use case that's not
> behaving as expected.
>
> Happy hacking,
> --
> "Some people worry that artificial intelligence will make us feel inferior,
> but then, anybody in his right mind should have an inferiority complex every
> time he looks at a flower."
> -- Alan Kay
>
> Saludos /\/\ /\ >< `/


Hi Maximiliano,

Thank you for the detailed explanations, but it looks like I managed
to solve the problem. I decided to try a clean start following the
directions provided at

http://docs.kde.org/trunk5/en/kdepim/kmail/clean-start-after-a-failed-migration.html

I also uninstalled all pim packages that seemed to be related to
previous versions of kdepim (packages at version 4:4.14.10-x). After
that, I started kmail and used the account wizard to add a Gmail
account, just as I had done before. I also checked the option
"Download all messages for offline use". I then did an initial mail
check and that took hours. After it was done, I checked the folder
~/.local/share/akonadi/ and noticed it was bigger than 10 GB in size,
which seems to indicate that all messages had actually been downloaded
from the server. Also, I can now read all messages while in offline
mode.

I should note that I had done a clean start the other time around too,
so I suspect that what solved the problem was uninstalling the kdepim
packages.

Please note that my main reason for using disconnected IMAP is for
backup reasons. I'm very glad that this is working again on my system.

Thank you very much for all your help.

Adriano


Reply to: