[Bug 275418] IMAP (sub-)subfolders empty in kmail2

Modestas Vainius modestas at vainius.eu
Mon Jun 27 10:52:24 BST 2011


https://bugs.kde.org/show_bug.cgi?id=275418





--- Comment #2 from Modestas Vainius <modestas vainius eu>  2011-06-27 09:52:23 ---
In short the cause of this bug is that migrator assumes (or misdetects) that a
IMAP hierarchy separator. It assumes it to be '/' (GMail default) while dovecot
uses '.' by default. If you're using akonadi mysql backend (if not, you can
still adapt the instructions), read the IRC conversation below to fix this for
your setup. Please note that these instructions deal with consequences, not the
cause.

[Wednesday 15 June 2011] [01:07:42] <MoDaX>    do have imap folders like
INBOX/something ?
[Wednesday 15 June 2011] [01:07:55] <MoDaX>    or rather INBOX.something
[Wednesday 15 June 2011] [01:08:51] <otherperson>    On my private accout all
folders are subfolders of INBOX
[Wednesday 15 June 2011] [01:09:19] <MoDaX>    and they open fine?
[Wednesday 15 June 2011] [01:09:24] <otherperson>    yes
[Wednesday 15 June 2011] [01:09:35] <otherperson>    MoDaX: wait
[Wednesday 15 June 2011] [01:09:38] <otherperson>    no they don't
[Wednesday 15 June 2011] [01:09:41] <MoDaX>    heh
[Wednesday 15 June 2011] [01:09:44] <otherperson>    :S
[Wednesday 15 June 2011] [01:10:39] <otherperson>    Did I lose all my mails in
INBOX/sent ? 
[Wednesday 15 June 2011] [01:11:10] <MoDaX>    otherperson: not yet
[Wednesday 15 June 2011] [01:11:19] <otherperson>    promising words :D
[Wednesday 15 June 2011] [01:11:19] <MoDaX>    kmail2 does not show them
[Wednesday 15 June 2011] [01:11:57] <otherperson>    MoDaX: strange is, that I
sent a test mail, and it (and only it) is visibile in IBOX/sent
[Wednesday 15 June 2011] [01:12:43] <MoDaX>    otherperson: akonadi cached it,
it's not on the imap server though
[Wednesday 15 June 2011] [01:12:54] <otherperson>    ok
[Wednesday 15 June 2011] [01:13:01] <MoDaX>    you better delete it
[Wednesday 15 June 2011] [01:13:08] <otherperson>    so how do I make
subfolders visibile
[Wednesday 15 June 2011] [01:13:12] <otherperson>    ok
[Wednesday 15 June 2011] [01:13:27] <MoDaX>    otherperson: scroll back to my
backlog from yesterday
[Wednesday 15 June 2011] [01:13:53] <MoDaX>    I hope you use mysql as akonadi
backend, don't you?
[Wednesday 15 June 2011] [01:14:39] <otherperson>    MoDaX: yes
[Wednesday 15 June 2011] [01:16:10] <MoDaX>    otherperson: this is going to be
a bit tricky. connect to mysql server
[Wednesday 15 June 2011] [01:16:12] <MoDaX>    mysql --socket
~/.local/share/akonadi/socket-`hostname`/mysql.socket
[Wednesday 15 June 2011] [01:16:47] <MoDaX>    there do 'use akonadi'
[Wednesday 15 June 2011] [01:17:14] <otherperson>    database changed
[Wednesday 15 June 2011] [01:18:02] <MoDaX>    otherperson: select id,
remoteid, name, parentid from collectiontable;
[Wednesday 15 June 2011] [01:18:16] <MoDaX>    remember IDs of your imap
folders
[Wednesday 15 June 2011] [01:19:17] <MoDaX>    stop kmail2
[Wednesday 15 June 2011] [01:19:23] <otherperson>    where to find the ID's
[Wednesday 15 June 2011] [01:19:29] <otherperson>    IDs
[Wednesday 15 June 2011] [01:19:43] <MoDaX>    otherperson: select gave them to
you
[Wednesday 15 June 2011] [01:19:51] <MoDaX>    first column
[Wednesday 15 June 2011] [01:20:10] <otherperson>    MoDaX: ahh, overread that
line
[Wednesday 15 June 2011] [01:20:12] <otherperson>    ok
[Wednesday 15 June 2011] [01:20:30] <otherperson>    kmail stoped
[Wednesday 15 June 2011] [01:21:25] <MoDaX>    your mailbox subfolders should
be sequential and fit into min <= id AND id <= max . find those min and max
from the output
[Wednesday 15 June 2011] [01:22:33] <otherperson>    so there is a line:
7->imap:... and  all in between until 27->/Trash
[Wednesday 15 June 2011] [01:22:51] <otherperson>    is then 8-27 ?
[Wednesday 15 June 2011] [01:23:00] <MoDaX>    yeah
[Wednesday 15 June 2011] [01:23:13] <MoDaX>    what you need to do here is to
change the first symbol of remoteid column from '/' to '.'
[Wednesday 15 June 2011] [01:23:14] <otherperson>    ok
[Wednesday 15 June 2011] [01:23:37] <MoDaX>    update collectiontable set
remoteid = concat('.', substr(remoteid from 2)) where id >= 80 AND id <= 85
[Wednesday 15 June 2011] [01:23:43] <MoDaX>    replace min and max
[Wednesday 15 June 2011] [01:25:47] <MoDaX>    then in another console restart
akonadi (akonadictl restart). mysql server will restart, reconnect to it and
recheck with select if remoteid where actually changed
[Wednesday 15 June 2011] [01:27:37] <otherperson>    ok, went fine I guess
[Wednesday 15 June 2011] [01:27:42] <otherperson>    start kmail2 ?
[Wednesday 15 June 2011] [01:28:08] <otherperson>    really annoying bug
[Wednesday 15 June 2011] [01:28:24] <otherperson>    imagine explaining this to
old users at a university
[Wednesday 15 June 2011] [01:28:29] <MoDaX>    yeah, start it
[Wednesday 15 June 2011] [01:28:46] <MoDaX>    folder icons should be back too
now
[Wednesday 15 June 2011] [01:28:53] <otherperson>    MoDaX: Yippie
[Wednesday 15 June 2011] [01:29:00] <otherperson>    thanks a lot
[Wednesday 15 June 2011] [01:29:55] <MoDaX>    but kmail2 might still eat your
mail. better disable automatic expurging in account settings. might help
[Wednesday 15 June 2011] [01:30:20] <MoDaX>    I think I have already "saved" 5
mails with this today
[Wednesday 15 June 2011] [01:30:33] <MoDaX>    they are both 'deleted' and
'unread' now :)

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Kdepim-bugs mailing list