In order to support an inbound migration of mails, I need to configure dovecot to use UTF-8 for Maildir file names. There is a documented way to do this, so I have tried to implement it by placing the following statement Code: mail_location = mbox:~/mail:INBOX=/var/mail/%u:UTF-8 in my custom configuration file Code: /etc/dovecot/conf.d/99-ispconfig-custom-config.conf but this does not work. Is there another (working) way to implement this change that will be robust against an update ? [using Debian 12 / Ispconfig 3.2]
Why don't you leave the ISPConfig setup as it is and convert the content of the mailboxes to Maildir format using a script while you migrate and import them? What matters when you migrate mailboxes is their content, it makes not much sense to me to try to keep the external technical format of the mail storage during migration when the new system uses a different approach.
I do plan to bring over my user's Maildirs (it's Already a Maildir on the old server), but the users have many subscribed folders whose names contain accented characters. Converting these names complicates a process which could be simple, albeit time consuming given the volumes involved. So if there is a solution to make dovecot use UTF-8 in its Maildir naming, I would prefer it considerably. Also, having readable filenames in Maildir facilitates considerably maintenance when required. And the least that can be said is that mUTF7 is not trendy at the moment, whereas UTF-8 is gaining ground everywhere Long story short, do you know if there a solution to make dovecot UTF-8 compliant ?
Okay, it is possible to convert a UTF-8 Maildir in place after importing it, by using the command Code: convmv [--notest] [-qfrom] [-qto] -r -f utf8 -t IMAP-UTF-7 /var/vmail/mydomain.com/johndoe/Maildir but the IMAP--UTF-7 charset, being legacy and obsolete, is not supported by convmv, so you have to patch it first Code: apt-get install libencode-imaputf7-perl --- convmv 2010-09-03 14:36:52.000000000 +0200 +++ convmv 2010-09-03 14:36:02.000000000 +0200 @@ -246,6 +246,7 @@ #use Encode 'is_utf8'; use Unicode::Normalize; use utf8; +use Encode::IMAPUTF7; use bytes; Getopt::Long::Configure ("bundling"); It works but it is painful. And it really sucks having to script this, just because ISPConfig configures Dovecot to use an obsolete legacy charset, and does not provide or document a way to change this configuration before performing the import of state-of-the art UTF-8 Maildir's
Your post is completely misleading: ISPConfig uses the default that Dovecot uses and recommends, so its not ISPConfig that configures Dovecot to use a legacy format. Dovecot uses UTF8 internally, as stated in their documentation. Just the outside storage format for maildirs uses utf7 by default in Dovecot. If Dovecot decides to alter its storage format defaults, then ISPConfig will pick up that change automatically, as we do not enforce any specific non-default format. Generally, you should not manage maildirs manually outside of Doveot anyway, so the way Doveot handles its internal storage format should not matter to you as you can use UTF8 in maildir names in your email client. You complain that we do not provide documents about changing something you should not alter. If you want a custom non-standard Dovecot setup, then you can find such info in the Dovecot documentation. ISPConfig is fully customizable and you can override any config file used or written by ISPConfig easily using custom configs. ISPConfig uses a standard Dovcot virtual user setup, and in such a virtual setup, the user's maildir is created by an SQL query. Take a look into dovecot-sql.conf if you want to learn how such a setup works.
Thanks for the tip, Till. But I have not found a way to exploit it without changing the dovecot-sql.conf itself, something that -yes- I am reluctant to do. Would there be a less intrusive way ? Regarding the "standard" for Maildir character set, it may be of interest to you to know that Plesk configures Maildir for UTF-8 these days. That's where I am migrating from, as you may have guessed. And Plesk, who have 53% of the world market for commercial panels, can't really be seen as a marginal player, therefore I stick to my guns about UTF-8 Maildir being the probable standard in the future. Incidentally, your comment may be true, but ISPConfig uses dovecot version 2.3.19.1, whereas Plesk uses 2.3.21.1 where the structure of the configuration files have been extremely simplified, with only one dovecot.conf file, and an empty conf.d except for the sni directives. With such a setup, modifications like UTF-8 Maildir would be almost trivial to implement in that parameter structure, and robust to updates. Perhaps ISPConfig has plans to integrate this new version of dovecot in the future ? The roadmap doesn't say. Nor does it talk about implementing sni, so that the website certificates of the domain can benefit imap/smtp/pop, something which is really easy to do and that Plesk implements as standard - hence my initial confusion about this. I apologize if I sound like I am bitching but these are problems that surface during a migration, and they are just as real as they are frustrating and difficult to resolve with under the current setup.
That's the config file where this config is set and it is easily overridable in ISPConfig using conf-custom/install/ folder. As an example, see: https://forum.howtoforge.com/threads/how-to-make-named-conf-options-persistent.93321/#post-461705 or https://forum.howtoforge.com/threads/new-handling-for-custom-postfix-and-dovecot-config.86559/ Basically, what you do for install time config changes is that you take the template for the file you want to alter from here https://git.ispconfig.org/ispconfig/ispconfig3/-/tree/develop/install/tpl (or from ispconfig tar.gz file) and copy it to /usr/local/ispconfig/server/conf-custom/install/ and modify the template plus the config file itself. Besides that, I explained already that your attempt to change Dovecot default storage format to a non-standard setup is not a good idea in general. That Plesk decided to go against Dovecot Maildir default encoding does not make Plesk's way of doing this a standard in any way. Plesk is the one here who does not adhere to Dovecot's standard; ISPConfig on the opposite site automatically uses what Dovecot developers see as the best default. Changing the config without editing the config file where that setting, in this case the maildir, is defined is not possible. ISPConfig supports all default Dovecot versions of the supported OS. ISPConfig does not use any specific Dovecot version; it checks for the installed Dovecot version and deploys config files based on the version it finds on the system. ISPConfig uses the version of Dovecot that ships as default with the OS you use. Also, the config file layout does not depend on the Dovecot version anyway. Using more config files would mean having many more config file templates as you change such settings in the template to make it update-safe and not only in the system-generated config file. ISPConfig is not as limited as Plesk regarding software versions as we do not deliver a specific version of a software; we always support the latest Dovecot version that ships by default with a supported OS. Therefore, we do not need to announce anything regarding Dovecot versions. If you see, e.g., Dovecot version 2.3.19.1 on your system, then that's not because ISPConfig needs that specific version; you see that because it's the version that comes with the OS that you have chosen as the basis for your server, and it will automatically update and even upgrade with your OS.