Hi! Actually those settings are valid outside namespace too. Not sure why you think they should be inside namespace?
Aki > On 29/09/2025 17:52 EEST Andy Baugh via dovecot <dovecot@dovecot.org> wrote: > > > So, this message is pointing to the problem, it's just not obvious on first > glance as to why. mail_driver is only a valid configuration parameter *in the > scope of a namespace*. Both the error messages and docs do hint towards this, > but it takes a bit of dedication to figure out. > > In this case it means you need those params within your "namespace inbox" > config scope/block instead of in the global configuration. EX. > > namespace inbox { > mail_driver = maildir > mail_path = %{home}/Maildir > ... > } > > This is a bit frustrating, as it does represent a bit of behavior change; on > 2.3, "defaults" could effectively be set for all namespaces you setup due to > being able to set them in the global scope. On 2.4, this is no longer the > case for many parameters, though there are exceptions to this, which is part > of why it is frustrating to deal with. > > Cheers, > -- > Thomas "Andy" Baugh | Software Development Engineer IV > andy.ba...@webpros.com > http://www.webpros.com/ > > ________________________________________ > From: User via dovecot <dovecot@dovecot.org> > Sent: Saturday, September 27, 2025 4:42 PM > To: dovecot@dovecot.org <dovecot@dovecot.org> > Subject: Dovecot 2.3 to 2.4 invalid Maildir settings > > Greetings, > > I am unable to completely migrate my Dovecot 2.3 config to 2.4.1 as I'm > unable to get past the following error: > > Error: Namespace inbox: maildir: maildir settings: Failed to parse > configuration: Failed to override configuration from userdb: Invalid > maildir=${domain}/${user}/: Setting is a named filter, use 'maildir {' > > I found a similar encounter at > https://www.mail-archive.com/dovecot@dovecot.org/msg90843.html that > points to > https://doc.dovecot.org/2.4.0/core/config/mailbox/mail_location.html#per-user-mail-locations > yet I still can't get my config to work. I've attached my doveconf at > the end, including the ported 2.3 settings that used to work for me > (commented out). > > I would appreciate any advise. > > # /etc/dovecot/dovecot.conf > dovecot_config_version = 2.4.1 > dovecot_storage_version = 2.4.1 > > sql_driver = mysql > mysql /run/mysqld/mysqld.sock { > user = mail > password = mail > dbname = mail > } > passdb sql { > query = SELECT username AS user, \ > password FROM mailbox WHERE username = '%{user}' AND active='1' > default_password_scheme = ARGON2I > } > userdb sql { > query = SELECT maildir, \ > 600 AS uid, \ > 600 AS gid \ > FROM mailbox WHERE username = '%{user}' AND active='1' > iterate_query = SELECT username AS user FROM mailbox > } > # previously: > # passdb { > # driver = sql > # args = /etc/dovecot/dovecot-sql.conf.ext > # } > # userdb { > # driver = sql > # args = /etc/dovecot/dovecot-sql.conf.ext > # } > > # disable_plaintext_auth = yes > auth_username_format = %{user | lower} # previously: > "auth_username_format = %Lu" > auth_mechanisms = plain login > auth_default_domain = mail.com # previously: "auth_default_realm = > mail.com" > auth_debug = yes > auth_debug_passwords = yes > > mail_privileged_group = mail > # previously: "mail_location = maildir:~/Maildir" > mail_driver = maildir > mail_path = %{home}/Maildir > mail_home = /var/vmail/%{user | domain}/%{user | username} # previously: > "mail_home = /var/vmail/%d/%n/" > > service lmtp { > unix_listener /var/spool/postfix/private/dovecot-lmtp { > mode = 0600 > user = postfix > group = postfix > } > } > service auth { > unix_listener /var/spool/postfix/private/auth { > mode = 0660 > user = postfix > group = postfix > } > } > service stats { > unix_listener stats-reader { > user = nginx > group = nginx > mode = 0660 > } > unix_listener stats-writer { > user = nginx > group = nginx > mode = 0660 > } > } > > ssl = required > ssl_min_protocol = TLSv1.2 > ssl_server_prefer_ciphers = server # previously: > "ssl_prefer_server_ciphers = yes" > ssl_server { > dh_file = /etc/ssl/dovecot/dh.pem > cert_file = /etc/ssl/dovecot/tls.pem > key_file = /etc/ssl/dovecot/tls.key > } > # previously: > # ssl_dh = </etc/ssl/dovecot/dh.pem > # ssl_cert = </etc/ssl/dovecot/tls.pem > # ssl_key = </etc/ssl/dovecot/tls.key > > namespace inbox { > inbox = yes > mailbox Archive { > auto = subscribe > special_use = \Archive > } > mailbox Drafts { > auto = subscribe > special_use = \Drafts > } > mailbox Junk { > auto = subscribe > special_use = \Junk > } > mailbox Trash { > auto = subscribe > special_use = \Trash > } > mailbox Sent { > auto = subscribe > special_use = \Sent > } > mailbox "Sent Messages" { > special_use = \Sent > } > } > > protocols = imap lmtp > > # previously: /etc/dovecot/dovecot-sql.conf.ext > driver = mysql > connect = host=localhost dbname=mail user=mail password=mail > default_pass_scheme = ARGON2I > password_query = SELECT username AS user,password FROM mailbox WHERE > username = '%u' AND active='1' > user_query = SELECT maildir, 600 AS uid, 600 AS gid FROM mailbox WHERE > username = '%u' AND active='1' > iterate_query = SELECT username AS user FROM mailbox > _______________________________________________ > 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 _______________________________________________ dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-le...@dovecot.org