> On 05/09/2025 10:13 EEST Zhang Huangbin via dovecot <[email protected]> 
> wrote:
> 
>  
> > On Sep 5, 2025, at 14:54, Aki Tuomi via dovecot <[email protected]> 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: [email protected]
> mailboxformat: maildir
> mailboxfolder: Maildir
> *************************** 2. row ***************************
>      username: [email protected]
> 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}`?

There are no such variables. There is only owner_home and owner_user. It will 
most likely work the way I explained to you.

Aki

_______________________________________________
dovecot mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to