> On Sep 5, 2025, at 14:54, Aki Tuomi via dovecot <dovecot@dovecot.org> wrote:
> 
> You can try to make it work *but* it requires that everyone has the *same* 
> root folder for mails (mail_path). If you use something like mdbox/ and 
> maildir/, it's  not going to be possible to make it work. So use something 
> like `mail/`.

We store mailbox format and folder name in SQL like below:

```
MariaDB [vmail]> select username,mailboxformat,mailboxfolder from mailbox \G
*************************** 1. row ***************************
     username: mail...@a.io
mailboxformat: maildir
mailboxfolder: Maildir
*************************** 2. row ***************************
     username: md...@a.io
mailboxformat: mdbox
mailboxfolder: mdbox
```

I also updated userdb to query and return them, then use them in
`namespace shared {}` like `%{userdb:mailboxformat}`, `%{userdb:mailboxfolder}`,
doesn't work either.

> Once everyone has same mail root folder, you can try to use mail_driver=auto 
> in namespace shared. Don't use this for namespace inbox, because it will 
> behave unexpectedly (for you) if the mailbox does not exist.
> 
> You will run into exact same issues with 2.3 and 2.4. The problem is that the 
> shared namespace cannot know what the target user is using for mail path if 
> you  don't use the same path.

Doc mentions variables like `%{owner_home}`, `%{owner_user}`, will it
work perfectly if Dovecot exports owner's `mail_driver` and `mail_path`
with variables like `%{owner_mail_driver}`, `%{owner_mail_path}`?
_______________________________________________
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org

Reply via email to