We have moved to a new Sailfish OS Forum. Please start new discussions there.

Revision history [back]

click to hide/show revision 1
initial version

posted 2017-03-28 01:19:37 +0200

email-app IMAP folder assignment logic

I think the logic for assigning default IMAP folder is not ok on SailfishOS 2.1.0.9 (2017-03-23).
Thunderbird did it ok with my folders.
Example:
I have a folder Sent at top-level. Then other like "old.sent-2015", "old.lessimportant-sent", etc. So, "old" is at top-level, "sent-2015" a level below.
On initial setup, the mail-app picked "old.lessimportant-sent" for its "sent" folder.
Renaming all folders containing "sent" in their names, "sent" -> "snt", and leaving the one meant to be the sent folder gave me the right choice on initial setup.
For now, one does not have to live with wrong assignments. In some cases, where one has name collisions, one can not even see the mails, even when the UI shows the number of mails in a folder, there are no mails listed.
CLI:
sqlite3 .qmf/database/qmailstore.db
select * from mailaccountfolders where id=(select max(parentaccountid) from mailfolders);
The columns are:
id,foldertype,folderid
Example: (id gets incremented as mail accounts are created and deleted)
34|1|13550
34|3|12627
34|4|13542
34|5|12969
34|6|12939
"foldertype" 1 is INBOX, 3 Drafts, 5 Trash and 6 Spam.
select * from mailfolders where id=12627;
gives, for example:
12627|old.Drafts|12530|34|23825|Drafts|0|0|0
So it picked "Drafts" in "old" as folder for "Drafts".
If you want to correct that, you will have to look at your folders:
(for the last account created!)
select * from mailfolders where parentaccountid=(select max(parentaccountid) from mailfolders);
The columns are:
id,name,parentid,parentaccountid,...
This "id" of mailfolders is "folderid" in mailaccountfolders.
Then:
update mailaccountfolders set folderid=13549 where foldertype=3 and id=34;
which is:
select * from mailfolders where id=13549;
13549|Templates|0|34|23569|Templates|9|1|0
When you're done, start your mail-app....

email-app IMAP folder assignment logic

I think the logic for assigning default IMAP folder is not ok on SailfishOS 2.1.0.9 (2017-03-23).
Thunderbird did it ok with my folders.
Example:
I have a folder Sent at top-level. Then other like "old.sent-2015", "old.lessimportant-sent", etc. So, "old" is at top-level, "sent-2015" a level below.
On initial setup, the mail-app picked "old.lessimportant-sent" for its "sent" folder.
Renaming all folders containing "sent" in their names, "sent" -> "snt", and leaving the one meant to be the sent folder gave me the right choice on initial setup.
For now, one does not have to live with wrong assignments. In some cases, where one has name collisions, one can not even see the mails, even when the UI shows the number of mails in a folder, there are no mails listed.
CLI:
sqlite3 .qmf/database/qmailstore.db
select * from mailaccountfolders where id=(select max(parentaccountid) from mailfolders);
The columns are:
id,foldertype,folderid
Example: (id gets incremented as mail accounts are created and deleted)
34|1|13550
34|3|12627
34|4|13542
34|5|12969
34|6|12939
"foldertype" 1 is INBOX, 3 Drafts, 5 Trash and 6 Spam.
select * from mailfolders where id=12627;
gives, for example:
12627|old.Drafts|12530|34|23825|Drafts|0|0|0
So it picked "Drafts" in "old" as folder for "Drafts".
If you want to correct that, you will have to look at your folders:
(for the last account created!)
select * from mailfolders where parentaccountid=(select max(parentaccountid) from mailfolders);
The columns are:
id,name,parentid,parentaccountid,...
This "id" of mailfolders is "folderid" in mailaccountfolders.
Then:
update mailaccountfolders set folderid=13549 where foldertype=3 and id=34;
which is:
select * from mailfolders where id=13549;
13549|Templates|0|34|23569|Templates|9|1|0
When you're done, start your mail-app....