I accidentally hit "archive" instead of "move" and now I have two mails I 
can't get back on my IMAP server using K9. The solution mentioned in the 
previous post didn't work for me.

As the project moved from Google Code to github, I opened a new issue: 
https://github.com/k9mail/k-9/issues/823

In the meantime I recovered the mails with a lengthy workaround:
- using "adb pull" I downloaded the SQLite database of K9 to my PC
- imported the "messages" table into mysql (I couldn't get the next step 
running with SQLite alone)
- created a SELECT statement that outputs one string column with the 
relevant data in "mbox" format
- used my email program Sylpheed to import the mails in mbox format

The mails lost their references, the date was hard-coded and I only 
restored the plain text content. But now I have them in the IMAP folder I 
wanted to move them in the first place.

If anyone is interested in the SELECT, here it is

select 
concat ('From ', replace(m.sender_list, ';', ''), '  Sun Aug 16 14:29:57 
2015
Date: Sun, 15 Aug 2015 14:29:57 +0200
To: ', replace(m.to_list, ';', ''), '
Subject: ', m.subject, '
From: ', replace(m.sender_list, ';', ''), '
Message-Id: ', m.message_id, '
Content-Type: text/plain; charset=UTF-8

',m.text_content)
from messages m
where m.id = 22948;

-- 
-- 
You received this message because you are subscribed to the K-9 Mail Users List.
To post to this group, send email to [email protected]
To unsubscribe, email [email protected]
To report an issue with K-9 Mail, visit 
http://code.google.com/p/k9mail/issues/list
For more options, visit this group at http://groups.google.com/group/k-9-mail

--- 
You received this message because you are subscribed to the Google Groups "K-9 
Mail" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to