Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MailKit returns duplicate folders from SmarterMail 13.0 server #149

Closed
vzhusel opened this issue Feb 17, 2015 · 4 comments
Closed

MailKit returns duplicate folders from SmarterMail 13.0 server #149

vzhusel opened this issue Feb 17, 2015 · 4 comments

Comments

@vzhusel
Copy link

vzhusel commented Feb 17, 2015

I guess this is SmarterMail issue, but wanted to check if there's a solution how to prevent this from happening using MailKit.

Structure on server:
Inbox
- 2222
- TTT
Deleted Items
Junk E-Mail
Sent Items

But from mail kit I get:
Inbox
Deleted Items
- 2222
- TTT
- 2222
- TTT
Junk E-Mail
Sent Items
- 2222
- TTT

Here's a log
Connected to imap://10.211.55.4:143/
S: * OK IMAP4rev1 SmarterMail
C: E00000000 CAPABILITY
S: * CAPABILITY IMAP4rev1 UIDPLUS XLIST
S: E00000000 OK CAPABILITY completed
C: E00000001 LOGIN admin@zzz 123qwe
S: * CAPABILITY IMAP4rev1 UIDPLUS XLIST
S: E00000001 OK LOGIN completed
C: E00000002 LIST "" ""
S: * LIST (\Noselect) "/" ""
S: E00000002 OK LIST completed
C: E00000003 LIST "" "INBOX"
S: * LIST (\Unmarked) "/" "Inbox"
S: E00000003 OK LIST completed
C: E00000004 XLIST "" "*"
S: * XLIST (\Unmarked \Trash) "/" "Deleted Items"
S: * XLIST (\Unmarked \Inbox) "/" "Inbox"
S: * XLIST (\Unmarked \Spam) "/" "Junk E-Mail"
S: * XLIST (\Unmarked \Sent) "/" "Sent Items"
S: * XLIST (\Unmarked) "/" "Inbox/TTT"
S: * XLIST (\Unmarked) "/" "Inbox/2222"
S: E00000004 OK XLIST completed
C: E00000005 LIST "" "%"
S: * LIST (\Unmarked) "/" "Deleted Items"
S: * LIST (\Unmarked) "/" "Inbox"
S: * LIST (\Unmarked) "/" "Junk E-Mail"
S: * LIST (\Unmarked) "/" "Sent Items"
S: E00000005 OK LIST completed
C: E00000006 LIST "" "Deleted Items/%"
S: * LIST (\Unmarked) "/" "Inbox/TTT"
S: * LIST (\Unmarked) "/" "Inbox/2222"
S: E00000006 OK LIST completed
C: E00000007 LIST "" "Inbox/TTT/%"
S: E00000007 OK LIST completed
C: E00000008 LIST "" "Inbox/2222/%"
S: E00000008 OK LIST completed
C: E00000009 LIST "" "Inbox/%"
S: * LIST (\Unmarked) "/" "Inbox/TTT"
S: * LIST (\Unmarked) "/" "Inbox/2222"
S: E00000009 OK LIST completed
C: E00000010 LIST "" "Inbox/TTT/%"
S: E00000010 OK LIST completed
C: E00000011 LIST "" "Inbox/2222/%"
S: E00000011 OK LIST completed
C: E00000012 LIST "" "Junk E-Mail/%"
S: * LIST (\Unmarked) "/" "Inbox/TTT"
S: * LIST (\Unmarked) "/" "Inbox/2222"
S: E00000012 OK LIST completed
C: E00000013 LIST "" "Inbox/TTT/%"
S: E00000013 OK LIST completed
C: E00000014 LIST "" "Inbox/2222/%"
S: E00000014 OK LIST completed
C: E00000015 LIST "" "Sent Items/%"
S: * LIST (\Unmarked) "/" "Inbox/TTT"
S: * LIST (\Unmarked) "/" "Inbox/2222"
S: E00000015 OK LIST completed
C: E00000016 LIST "" "Inbox/TTT/%"
S: E00000016 OK LIST completed
C: E00000017 LIST "" "Inbox/2222/%"
S: E00000017 OK LIST completed

Thank you.

@jstedfast
Copy link
Owner

This is why:

C: E00000006 LIST "" "Deleted Items/%"
S: * LIST (\Unmarked) "/" "Inbox/TTT"
S: * LIST (\Unmarked) "/" "Inbox/2222"
S: E00000006 OK LIST completed

The client is asking for subfolders of "Deleted Items" and the server is responding with children of Inbox which makes absolutely no sense at all.

@vzhusel
Copy link
Author

vzhusel commented Feb 17, 2015

This is what I was thinking. Thank you, for confirming this. Closing

@vzhusel vzhusel closed this as completed Feb 17, 2015
jstedfast added a commit that referenced this issue Feb 17, 2015
…lders

This shouldn't be necessary, but broken IMAP servers like SmarterMail 13.0
(which is apparently not very smart at all) ruin it for the rest of us.

Fixes issue #149
@jstedfast
Copy link
Owner

I've added logic to try and filter that out but I don't have a good test case so perhaps you can test it out and let me know if it works.

@vzhusel
Copy link
Author

vzhusel commented Feb 18, 2015

Verified, working as expected. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants