Here is a fix I cooked up. By default, iOS Mail would not auto generate the correct folders and you would also be required to manually map to them in the iOS Settings. Another issue was Windows 10 Mail creating its own separate folder for sent emails called “Sent Items” which is now fixed as well since all sent emails regardless of client go into the “Sent Items” folder. So now, besides with Rainloop, email folder mappings work perfectly with iOS Mail and Windows 10 Mail and likely almost any other normal email client out there.
Note, though, that unless you know what you are doing, you will want to do this on a fresh install before logging in with any email accounts especially if you are using the built-in Rainloop webmail. Otherwise, Rainloop will map to the wrong folder locations for that login user and you will then have to clear some SQL database entries and Rainloop’s cached files in its data folder from the backend (highly discouraged!). So only proceed if you are starting with a fresh install of CyberPanel, skipping the next paragraph and starting with step 5.
But if you are not using the built-in Rainloop webmail, you can easily start with what you need from a fresh installation by doing the following:
Step 1. Delete all email accounts within CyberPanel
Step 2. Deleting all remnants of old emails within the vmail folder under the Home directory.
Step 3. You also delete any manually installed webmail clients (such as a non-stock Rainloop install or RoundCube) from their public_html directories .Step 4. Delete their respective databases. Once finished, proceed to the fifth and final step.
Step 5. Replace the namespace section in dovecot.conf under /etc/dovecot with the following and then restart the dovecot service (service dovecot restart):
namespace inbox {
inbox = yes
location =
prefix =
mailbox “Deleted Items” {
auto = create
special_use = \Trash
}
mailbox “Drafts” {
auto = create
special_use = \Drafts
}
mailbox “Archive” {
auto = create
special_use = \Archive
}
mailbox “Sent Items” {
auto = create
special_use = \Sent
}
mailbox “Junk Mail” {
auto = create
special_use = \Junk
}
}