See 
https://doc.dovecot.org/2.4.0/core/config/mailbox/mail_location.html#per-user-mail-locations

returning maildir is not the thing you want to do.

Aki

> On 13/02/2025 21:06 EET Asai via dovecot <dovecot@dovecot.org> wrote:
> 
>  
> >> On 13/02/2025 20:43 EET Asai via dovecot<dovecot@dovecot.org> wrote:
> >>
> >>   
> >> Greetings,
> >>
> >> We've been using Dovecot since 2007, and I'm migrating yet again to a
> >> new version of Dovecot.
> >>
> >> Going from 2.3 to 2.4 and a lot of things have changed.  I've been able
> >> to manage many of them, but I'm stuck on Maildir configuration, and I'm
> >> unable to understand the documentation as relates to this.  Hopefully
> >> someone can clarify.
> >>
> >> Error: Initializing mail storage from mail_driver=maildir setting
> >> failed: maildir: maildir settings: Failed to parse configuration: Failed
> >> to override configuration from userdb: Invalid maildir=gcmm.net/test/:
> >> Setting is a named filter, use 'maildir {'
> >>
> >> Here's my doveconf as it has been migrated from 2.3 to 2.4 thus far.  I
> >> realize that there are probably better ways to do things and I'm open to
> >> suggestions, but keep in mind that this is a production set up with
> >> hundreds of users and I've tried to maintain backwards compatibility
> >> through the years.
> >>
> >> Thanks for your assistance,
> >>
> >> Asai
> > What is the userdb value that you are passing to dovecot?
> >
> > Aki
> 
> Thanks Aki,
> 
> userdb sql {
>    iterate_query = select username from mailbox;
>    query = SELECT maildir, concat('/vmail/',maildir,'home') as home, 
> 1001 AS uid, 1001 AS gid FROM mailbox WHERE username = '%{user}' and 
> active = 1
> }
> 
> So the %{user} variable in this case is an email address.  Here's the 
> debug output, although in looking at this more closely I think this 
> might be a permissions issue:
> 
> Feb 13 12:00:34 
> auth-worker(t...@gcmm.net,10.1.1.247)<85479><wTxDrAoulrgKAQH3>: request 
> [1]: Debug: sql: Performing userdb lookup
> Feb 13 12:00:34 auth: Debug: auth-worker: Worker sent process limit '30'
> Feb 13 12:00:34 
> auth-worker(t...@gcmm.net,10.1.1.247)<85479><wTxDrAoulrgKAQH3>: request 
> [1]: Debug: sql: SELECT maildir, concat('/vmail/',maildir,'home') as 
> home, 1001 AS uid, 1001 AS gid FROM mailbox WHERE username = 
> 't...@gcmm.net' and active = 1
> Feb 13 12:00:34 auth-worker(85479): Debug: mysql(localhost): Finished 
> query 'SELECT maildir, concat('/vmail/',maildir,'home') as home, 1001 AS 
> uid, 1001 AS gid FROM mailbox WHERE username = 't...@gcmm.net' and 
> active = 1' in 0 msecs
> Feb 13 12:00:34 
> auth-worker(t...@gcmm.net,10.1.1.247)<85479><wTxDrAoulrgKAQH3>: request 
> [1]: Debug: sql: Finished userdb lookup
> Feb 13 12:00:34 auth-worker(85479): Debug: conn unix:auth-worker 
> (pid=85406,uid=0): auth-worker<1>: Finished
> Feb 13 12:00:34 
> auth(t...@gcmm.net,10.1.1.247,sasl:plain)<wTxDrAoulrgKAQH3>: Debug: sql: 
> Finished userdb lookup
> Feb 13 12:00:34 auth: Debug: master userdb out: USER 65404929 
> t...@gcmm.net   maildir=gcmm.net/test/ home=/vmail/gcmm.net/test/home  
> uid=1001        gid=1001 auth_mech=PLAIN 
> auth_token=a29a92ee45a72c4ac161f51f692cf0c4118fa174 
> local_name=triata.globalchange.media
> Feb 13 12:00:34 imap(t...@gcmm.net)<85478><wTxDrAoulrgKAQH3>: Debug: 
> Loading modules from directory: /usr/lib64/dovecot
> Feb 13 12:00:34 imap(t...@gcmm.net)<85478><wTxDrAoulrgKAQH3>: Debug: 
> Module loaded: /usr/lib64/dovecot/lib15_notify_plugin.so
> Feb 13 12:00:34 imap(t...@gcmm.net)<85478><wTxDrAoulrgKAQH3>: Debug: 
> Module loaded: /usr/lib64/dovecot/lib20_mail_log_plugin.so
> Feb 13 12:00:34 imap(t...@gcmm.net)<85478><wTxDrAoulrgKAQH3>: Debug: 
> Added userdb setting: maildir=gcmm.net/test/
> Feb 13 12:00:34 imap(t...@gcmm.net)<85478><wTxDrAoulrgKAQH3>: Debug: 
> Effective uid=1001, gid=1001, home=/vmail/gcmm.net/test/home
> Feb 13 12:00:34 imap(t...@gcmm.net)<85478><wTxDrAoulrgKAQH3>: Debug: 
> open(/proc/self/io) failed: Permission denied (euid=1001(vmail) 
> egid=1001(vmail) missing +r perm: /proc/self/io)
> Feb 13 12:00:34 imap(t...@gcmm.net)<85478><wTxDrAoulrgKAQH3>: Debug: 
> maildir++: root=/vmail/gcmm.net/test, index=, indexpvt=, control=, 
> inbox=/vmail/gcmm.net/test, alt=
> Feb 13 12:00:34 imap(t...@gcmm.net)<85478><wTxDrAoulrgKAQH3>: Debug: 
> User session is finished
> Feb 13 12:00:34 auth: Debug: conn unix:/run/dovecot/auth-master 
> (pid=85478,uid=0): auth-master client: Disconnected: Connection closed 
> (fd=21) (created 16 msecs ago, handshake 16 msecs ago)
> _______________________________________________
> dovecot mailing list -- dovecot@dovecot.org
> To unsubscribe send an email to dovecot-le...@dovecot.org

_______________________________________________
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org

Reply via email to