Skip to content

Fix mailbox prefix hierarchy#652

Closed
ChristophWurst wants to merge 4 commits into
masterfrom
fix/mailbox-prefix
Closed

Fix mailbox prefix hierarchy#652
ChristophWurst wants to merge 4 commits into
masterfrom
fix/mailbox-prefix

Conversation

@ChristophWurst
Copy link
Copy Markdown
Member

Apparently some mail servers prefix their mailboxes by INBOX and
hence the hierarchy logic previously detected those prefixes as parent
folders.

Ref #386

This only fixes the hierarchy problem. Folders will still be shown with a prefix. Since I'm fixing a problem without actually having an IMAP implementation with prefixes at hand, I'll fix this in smaller steps and let the community verify the fix.

cc @reubenlillie

Apparently some mail servers prefix their mailboxes by `INBOX` and
hence the hierarchy logic previously detected those prefixes as parent
folders.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
@ChristophWurst
Copy link
Copy Markdown
Member Author

Tarball for testing: mail.tar.gz

@ftoledo
Copy link
Copy Markdown

ftoledo commented Dec 18, 2017

Hi @ChristophWurst will this log help?

horde_imap.log

@ChristophWurst
Copy link
Copy Markdown
Member Author

Thank you very much @ftoledo, this already helped a bit. Now I know that there's a capability for this and your server reports that. However, I do not see how the folder structure looks on your account. Which actions were performed when you enabled those logs? Could you maybe clear the file, load the mail app page and post those new logs again? That's when the mail app asks for a list of folders and thus the logs should contain that list.

@ftoledo
Copy link
Copy Markdown

ftoledo commented Dec 18, 2017

@ChristophWurst i dont see the folder list at the horde log. I delete and recreate the account.

Can i increase some debug level to show these detail action ?

@ChristophWurst
Copy link
Copy Markdown
Member Author

Can i increase some debug level to show these detail action ?

No, actually it should log the full IMAP communication by default 🤔

@ftoledo
Copy link
Copy Markdown

ftoledo commented Dec 18, 2017

@ChristophWurst maybe a telnet session can help?

110 list "" %

  • LIST (\Marked \HasChildren) "." "INBOX"
    110 OK LIST completed

100 list "" "*"

  • LIST (\HasNoChildren) "." "INBOX.Archives.2014.2014-07"
  • LIST (\HasChildren) "." "INBOX.Archives.2014"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2012.2012-03"
  • LIST (\HasNoChildren) "." "INBOX.listas.solar.general"
  • LIST (\HasNoChildren) "." "INBOX.listas.anillo-lst"
  • LIST (\HasNoChildren) "." "INBOX.listas.alba.gestion"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2013.2013-07"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2015.2015-10"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2014.2014-08"
  • LIST (\HasNoChildren) "." "INBOX.Junk"
  • LIST (\HasNoChildren) "." "INBOX.listas.debian.mentors"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2015.2015-03"
  • LIST (\HasChildren) "." "INBOX.Archives"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2016.2016-05"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2012.2012-06"
  • LIST (\HasNoChildren) "." "INBOX.Enviados"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2012.2012-02"
  • LIST (\HasNoChildren) "." "INBOX.listas.solar.cdirectiva"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2012.2012-01"
  • LIST (\HasNoChildren) "." "INBOX.listas.canaima"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2016.2016-02"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2014.2014-02"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2014.2014-10"
  • LIST (\HasNoChildren) "." "INBOX.listas.mate-dev"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2014.2014-01"
  • LIST (\HasNoChildren) "." "INBOX.jl-tecnical"
  • LIST (\HasNoChildren) "." "INBOX.listas.solar.ooffice"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2013.2013-09"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2014.2014-05"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2011.2011-10"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2013.2013-02"
  • LIST (\HasNoChildren) "." "INBOX.listas.alba.desarrollo"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2014.2014-03"
  • LIST (\HasChildren) "." "INBOX.Archives.2016"
  • LIST (\HasNoChildren) "." "INBOX.listas.solar.publica"
  • LIST (\HasChildren) "." "INBOX.Archives.2013"
  • LIST (\HasNoChildren) "." "INBOX.listas.pyar"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2012.2012-10"
  • LIST (\HasNoChildren) "." "INBOX.listas.solar.secretaria"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2012.2012-04"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2013.2013-12"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2014.2014-11"
  • LIST (\HasNoChildren) "." "INBOX.Trash"
  • LIST (\HasNoChildren) "." "INBOX.listas.librevpn"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2015.2015-05"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2016.2016-03"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2016.2016-04"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2013.2013-04"
  • LIST (\HasChildren) "." "INBOX.Archives.2011"
  • LIST (\HasNoChildren) "." "INBOX.listas.debian.devel"
  • LIST (\HasNoChildren) "." "INBOX.listas.alba.usuarios"
  • LIST (\HasNoChildren) "." "INBOX.Archive"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2014.2014-04"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2016.2016-06"
  • LIST (\HasNoChildren) "." "INBOX.listas.ginga.ar"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2012.2012-08"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2013.2013-10"
  • LIST (\HasChildren) "." "INBOX.listas.ginga"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2011.2011-12"
  • LIST (\HasChildren) "." "INBOX.Archives.2012"
  • LIST (\HasNoChildren) "." "INBOX.listas.debian.live"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2015.2015-12"
  • LIST (\Marked \HasChildren) "." "INBOX"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2015.2015-02"
  • LIST (\HasNoChildren) "." "INBOX.nic-ar"
  • LIST (\HasNoChildren) "." "INBOX.listas.solar.socios"
  • LIST (\HasNoChildren) "." "INBOX.listas.solar.prensa"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2013.2013-06"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2015.2015-01"
  • LIST (\HasNoChildren) "." "INBOX.listas.avlibre"
  • LIST (\HasChildren) "." "INBOX.listas.solar"
  • LIST (\HasNoChildren) "." "INBOX.Drafts"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2014.2014-12"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2013.2013-03"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2016.2016-01"
  • LIST (\HasNoChildren) "." "INBOX.Sent"
  • LIST (\HasNoChildren) "." "INBOX.listas.ginga.hackers"
  • LIST (\HasNoChildren) "." "INBOX.listas.solar.inet"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2012.2012-07"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2012.2012-09"
  • LIST (\HasNoChildren) "." "INBOX.listas.misol"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2013.2013-11"
  • LIST (\HasNoChildren) "." "INBOX.listas.debian.devel-spanish"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2013.2013-01"
  • LIST (\HasNoChildren) "." "INBOX.listas.futbol-nerd"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2015.2015-08"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2013.2013-05"
  • LIST (\HasNoChildren) "." "INBOX.listas.solar.anuncios"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2015.2015-09"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2012.2012-11"
  • LIST (\HasNoChildren) "." "INBOX.listas.hispasec"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2015.2015-04"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2011.2011-11"
  • LIST (\HasNoChildren) "." "INBOX.Borradores"
  • LIST (\HasChildren) "." "INBOX.listas.debian"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2015.2015-11"
  • LIST (\HasNoChildren) "." "INBOX.listas.solar.crisol"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2012.2012-05"
  • LIST (\HasChildren) "." "INBOX.listas"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2014.2014-06"
  • LIST (\HasNoChildren) "." "INBOX.listas.solar.kernel"
  • LIST (\HasNoChildren) "." "INBOX.listas.talk-ar"
  • LIST (\HasChildren) "." "INBOX.listas.alba"
  • LIST (\HasChildren) "." "INBOX.Archives.2015"
  • LIST (\HasNoChildren) "." "INBOX.listas.lanux"
  • LIST (\HasNoChildren) "." "INBOX.Papelera"
  • LIST (\HasNoChildren) "." "INBOX.listas.debian.security"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2015.2015-06"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2012.2012-12"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2014.2014-09"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2015.2015-07"
  • LIST (\HasNoChildren) "." "INBOX.Archives.2013.2013-08"
    100 OK LIST completed

@ChristophWurst
Copy link
Copy Markdown
Member Author

@ftoledo perfect! In that case this PR should fix the hierarchy structure, as in not showing all folders as subfolder of INBOX. As noted in the description above, the UI will still show the INBOX. prefix. Can you confirm that?

@ftoledo
Copy link
Copy Markdown

ftoledo commented Dec 18, 2017

@ChristophWurst yes the INBOX prefix still visible:
recibidos ragnarok docksud com ar mail bbs cloud

@ChristophWurst
Copy link
Copy Markdown
Member Author

@ftoledo just to double-check: the folder structure did not look like this before replacing the app with the provided archive - correct? Before, the drafts, sent and other folders were shown as subfolders of the inbox, if I understand the problem correctly.

@ftoledo
Copy link
Copy Markdown

ftoledo commented Dec 18, 2017

I have same view as expose in #618 with both store app and this lastest tarball =(
I can provide a mail account in own server for test if you want.
Also, i want to say thanks you for your effort to solve to issue. =)

@ChristophWurst
Copy link
Copy Markdown
Member Author

I can provide a mail account in own server for test if you want.

That would be great. Could you please send me some credentials via mail? Thanks!

@archont00
Copy link
Copy Markdown

@ChristophWurst : is the tarball in #618 already supposed to solve also the situation with Maildir subfolders with a specific prefix?

That is, I have dovecot configured with

mail_location = maildir:~/Maildir:LAYOUT=fs:DIRNAME=0_mAIL

which results in file system hierarchy layout:

INBOX/0_mAIL/
Archives/0_mAIL/
Archives/2003/0_mAIL/
Archives/2004/0_mAIL/
...
z_Sorted/Funny/English/0_mAIL/

I tried the tarball #618, but I still see folder structure in the Mail app:

Archives
Archives/2003
Archives/2004
...
z_Sorted/Funny/English

@ChristophWurst
Copy link
Copy Markdown
Member Author

@ChristophWurst : is the tarball in #618 already supposed to solve also the situation with Maildir subfolders with a specific prefix?

What tarball? That's an old, unrelated issue, no?

I tried the tarball #618, but I still see folder structure in the Mail app:

Quoting myself from the patch description here

This only fixes the hierarchy problem. Folders will still be shown with a prefix. Since I'm fixing a problem without actually having an IMAP implementation with prefixes at hand, I'll fix this in smaller steps and let the community verify the fix.

Your problem seems unrelated to this hierarchy bug. It look more like your folder separator isn't detected correctly. Please file a separate ticket for that.

@archont00
Copy link
Copy Markdown

@ChristophWurst : appologies, new issue reported here: #689

@ChristophWurst
Copy link
Copy Markdown
Member Author

That would be great. Could you please send me some credentials via mail? Thanks!

@ftoledo hey, it seems I never received any credentials. Did you send them?

@brunt82
Copy link
Copy Markdown

brunt82 commented Jan 15, 2018

I could test a new version, but I cannot offer any credentials for you, sorry. Currently I can open my sub folders but there are still too many prefixes there. E.g:
##########
Posteingang
INBOX\subfolder 1
INBOX\subfolder 2
INBOX\subfolder 2\sub subfolder
##########
So I'm able to browse through the different folders and see the containing e-mails. But anyhow the "INBOX" or the "INBOX\subfolder 2"-prefix (for the third line) is still to much.

@ChristophWurst ChristophWurst modified the milestones: 0.7.8, 0.7.9 Jan 15, 2018
@Ninos
Copy link
Copy Markdown

Ninos commented Jan 18, 2018

As small information, sometimes you also have subfolders in Inbox, Trash, Sent or Draft-Folder. Please do not forget those folders :-)

@ChristophWurst ChristophWurst modified the milestones: 0.7.9, 0.7.10 Jan 22, 2018
@ChristophWurst
Copy link
Copy Markdown
Member Author

Unable to continue my work on this with the information given. If you want this to get fixed, see #386 (comment). Thanks.

@ChristophWurst ChristophWurst deleted the fix/mailbox-prefix branch January 22, 2018 10:26
@ChristophWurst ChristophWurst removed this from the 0.7.10 milestone Jan 22, 2018
@ChristophWurst ChristophWurst removed their assignment Jan 22, 2018
@ftoledo
Copy link
Copy Markdown

ftoledo commented Jan 23, 2018

@ChristophWurst Sorry the delay, i just send credentials for test to you gmail account

@trueshanti
Copy link
Copy Markdown

how is this issue "closed" ? .. i still experience same behavior in 0.8.2

@nextcloud nextcloud locked and limited conversation to collaborators Aug 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants