I'm trying to change the default special imap folders to make dovecot more compatible with outlook classic and new. Added in /etc/dovecot/conf.d/99-ispconfig-custom-config.conf: Code: namespace inbox { inbox = yes mailbox "Concepten" { special_use = \Drafts auto = subscribe } mailbox "Ongewenste e-mail" { special_use = \Junk auto = subscribe } mailbox "Verwijderde items" { special_use = \Trash auto = subscribe } mailbox "Verzonden items" { special_use = \Sent auto = subscribe } mailbox "Archiveren" { special_use = \Archive auto = subscribe } } It basically is working exactly as it should for roundcube, thunderbird and outlook classic and new. Special folders are created with names set in the config file and operational. Though Drafts, Junk, Sent and Trash folders are also still being created. I can't figure out why, how and where this happens.
The answer I feared I would get Is there a way then to add something to the end of the creation process via standard ispc config options? That would make it posible to remove the folders via script or something.
Yes, you can write a small plugin to do that. ISPConfig allows it to add as many plugin to an event as you like. It's important that the name of your plugin comes after the mail plugin in alphabetical order to ensure it gets run after the mail user is created.
I think it’s called a hook, and it’s probably the best way to achieve your goal, @remkoh. I was looking into extending ISPConfig Let’s Encrypt SSL myself, to support wildcard domains via DNS challenge by a plugin too, but that seems trickier without touching the default code since it currently denies wildcard. And a little bit deviated here, but @till — where should custom plugins be placed anyway? Together with the default, or would a separate plugins-custom folder be cleaner? Plugins only run once symlinked to “enabled,” so the exact location doesn’t matter much, but formal specifed folder like conf-custom, would keep things tidier, I think. And as ISPConfig default files, structures and core configs should remain unmodified after setup / updates, and only custom folders should be used for user changes, what do you think about it?
Just in the plugins folder. A custom plugins folder makes no sense for plugins, as it's not an override, unlike config files.
Noted. Fine with that too. May be finishing letsencrypt_dns_plugin.inc.php soon, so was asking because I was wondering where it is best to place it, so now it is decided to be in the same plugins-available. Will share it later once it is working good on my side. Creating this "simpler" plugin instead because I was not sure to create code for ISPConfig as it may involve creating extra LE SSL template (in SSL tab) and adding from it to database, and I haven't come to that level of bravery yet.
No clue where or how to even get started with a plugin. Kept it rather clean and simple with a bash script that runs every 5 minutes (by a cronjob). The script searches for newly created mailboxes in the last 15 minutes, renames the default Drafts, Junk, Sent and Trash folders, adds an archive folder and rebuilds the subscriptions file. Works like a charm. Every imap client tested and roundcube are ready to use from the get go with the correct special folders.