Skip to content

Create Archives folder and subscribe by default#2031

Closed
hnws wants to merge 5 commits intodocker-mailserver:masterfrom
hnws:patch-1
Closed

Create Archives folder and subscribe by default#2031
hnws wants to merge 5 commits intodocker-mailserver:masterfrom
hnws:patch-1

Conversation

@hnws
Copy link
Copy Markdown
Contributor

@hnws hnws commented Jun 9, 2021

Description

Clients should be able to share this "Archives" folder by default.
Usually email clients want to have an "Archives" folder.
By creating one following RFC-6154, all clients should be able to use it.

Tested on Linux Thunderbird, Outlook for Android and Spark for Android.

Fixes #2026

Type of change

  • Improvement (non-breaking change that does improve existing functionality)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (README.md or the documentation under docs/)
  • If necessary I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Clients should be able to share this "Archives" folder by default.
Tested on Linux Thunderbird, Outlook for Android and Spark for Android.
@reneploetz
Copy link
Copy Markdown
Contributor

reneploetz commented Jun 9, 2021

Even tough RFC6154 does not specify a specific name, I think the folder should be named "Archive" instead of "Archives" for compatibility reasons. Some mail clients stick to the exact name of the flag and do not support the "SPECIAL-USE" flag in the LIST IMAP command. Most notably Windows Mail is using hardcoded localized values and does not support RFC6154.

Note that the original bug report stated issues with Thunderbird which created "Archives" and Outlook using "Archive" which was not created on the server. Thunderbird does support RFC6154 and will then pick up the "Archive" as folder.

@georglauterbach georglauterbach added this to the v10.0.1 milestone Jun 9, 2021
@georglauterbach georglauterbach requested review from a team June 9, 2021 11:05
@georglauterbach georglauterbach added kind/new feature A new feature is requested in this issue or implemeted with this PR meta/needs triage This issue / PR needs checks and verification from maintainers priority/low pr/needs review labels Jun 9, 2021
@georglauterbach
Copy link
Copy Markdown
Member

georglauterbach commented Jun 9, 2021

@reneploetz I‘ve been seeing you around here often lately, with very good answers and content. Interested in joining the moderator‘s team?

@casperklein
Copy link
Copy Markdown
Member

Does this change introduce any disadvantages? For example, in POP3 only setups?

@NorseGaud
Copy link
Copy Markdown
Member

Even tough RFC6154 does not specify a specific name, I think the folder should be named "Archive" instead of "Archives" for compatibility reasons. Some mail clients stick to the exact name of the flag and do not support the "SPECIAL-USE" flag in the LIST IMAP command. Most notably Windows Mail is using hardcoded localized values and does not support RFC6154.

Note that the original bug report stated issues with Thunderbird which created "Archives" and Outlook using "Archive" which was not created on the server. Thunderbird does support RFC6154 and will then pick up the "Archive" as folder.

💯 I agree. Otherwise, I really like what this PR proposes

williamdes
williamdes previously approved these changes Jun 9, 2021
Use the same between tag and folder name.
@hnws
Copy link
Copy Markdown
Contributor Author

hnws commented Jun 9, 2021

Updated the PR to use "Archive" instead of "Archives".
Thunderbird cannot use the new "Archive" folder automatically. It can be solved by moving all of the existing emails to new folder and change a setting.
On Spark for Android, I need to remove the accounts already setup to get rid of duplicated Archive folders.

How should I proceed with this? Should I learn and try to create a feature toggle?

@reneploetz
Copy link
Copy Markdown
Contributor

reneploetz commented Jun 9, 2021

@reneploetz I‘ve been seeing you around here often lately, with very good answers and content. Interested in joining the moderator‘s team?

I would be interested to help, yes.

@casperklein
At least POP3 should be unaffected as only the INBOX is mapped.

@hnws
I had a look into what Thunderbird is doing and it's somewhat tricky.
For new configurations, Thunderbird should pick up the folder name and use it accordingly. If the folder name has the "Archive" flag and is named "Archives", they will also localize it within their UI. Otherwise they will keep it named "Archive".
See also: https://github.com/mozilla/releases-comm-central/blob/master/mailnews/base/src/nsMsgDBFolder.cpp#L3089

If you have an existing IMAP configuration on both Spark and Thunderbird, this change will not update their configuration. You have to do this manually and potentially migrate.
Therefore I would say that this pull request currently is a breaking change as there might be other users that use different folder names for their current archive folders.

I had a look into how other projects are configuring dovecot:

Maybe it's an idea to do a minimal test with one name subscribing and the other just referenced. We would need to test creating a new account as well as what happens with the current account if the change is applied.

  mailbox "Archive" {
    auto = subscribe
    special_use = \Archive
  }
  mailbox "Archives" {
    special_use = \Archive
  }

In general, there appears to be no consensus on the name of the folder. I see a couple of options:

  • leave the name as "Archive" and let the user change the folder names manually - the server administrator can always override the default file using docker mounts or user-patches.sh
  • use the "translate all" approach (which we really need to test first)
  • create environment variables and startup scripts to allow the server administrator to configure the names - we can of course only do this with "Archive/Archives", but we are currently also commenting the "Sent/Sent Messages", so a broader approach might be an idea (but also maybe too much given the simplicity of overriding the default)

@hnws
Copy link
Copy Markdown
Contributor Author

hnws commented Jun 9, 2021

How about this:
Instead of pushing this config to everyone, I will add this to documentation and provide the config file as an example?

@georglauterbach
Copy link
Copy Markdown
Member

How about this:
Instead of pushing this config to everyone, I will add this to documentation and provide the config file as an example?

That's a very good idea!

@georglauterbach
Copy link
Copy Markdown
Member

Any progress on the subject?

@hnws
Copy link
Copy Markdown
Contributor Author

hnws commented Jun 15, 2021

Any progress on the subject?

Sorry for the reply. I think I will update this PR late this week to create a new document page for this purpose.

@hnws
Copy link
Copy Markdown
Contributor Author

hnws commented Jun 19, 2021

Replaced by #2045

@hnws hnws closed this Jun 19, 2021
@hnws hnws deleted the patch-1 branch June 21, 2021 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/new feature A new feature is requested in this issue or implemeted with this PR meta/needs triage This issue / PR needs checks and verification from maintainers priority/low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FR] Enable "Archive" folder by default

6 participants