Dovecot custom public namespace prefix

I’m actually migrating an old mail cyrus mail server to dovecot. And I guess I should keep the historic custom shared folders namespace prefix.

This seems no configurable item in ns7 AFAIS.

My 1st hack is to create a custom template 41namespaces in /etc/e-smith/templates-custom/etc/dovecot/dovecot.conf/ with just the section “namespace PUBLIC” copied and modified from the default template 40namespaces. This expands to a doubled section in /etc/dovecot.conf, the last seems to “win”, overwrites the default definitions.

Roundcube webmail correctly uses the new prefix immediately.

The nethserver web ui needs another hack in /usr/share/nethesis/NethServer/Module/MailAccount/SharedMailbox/SharedMailboxAdapter.php, the “Public/” namespace is hardcoded there and it’s length some lines later, too.

Before I start to properly make this configurable (eMail -> Mailboxes seems best suited?): is the prefix hardcoded anywhere else?

No, at least I couldn’t find the string “public/” elsewhere in the code except of /etc/e-smith/events/actions/nethserver-mail-upgrade-ns6acls (Github) but it’s not necessary to edit it I think.

1 Like