Migrating from 2.3 to 2.4 Maildir Config Problems
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
# 2.4.0 (daeb6bc59c): /etc/dovecot/dovecot.conf # Pigeonhole version 2.4.0 (1b2d5bb9) # OS: Linux 5.14.0-503.23.1.el9_5.x86_64 x86_64 AlmaLinux release 9.5 (Teal Serval) xfs # Hostname: xxxxx dovecot_config_version = 2.4.0 auth_allow_weak_schemes = yes auth_mechanisms = auth_mechanisms { plain = yes login = yes } auth_verbose_passwords = plain debug_log_path = /var/log/dovecot-debug.log default_vsz_limit = 512M deliver_log_format = msgid=%{msgid}: from=%{from}: %{deliver_log_format_extras} dovecot_storage_version = 2.4.0 hostname = xx.xxxx.xxxx log_path = /var/log/dovecot.log mail_driver = maildir mail_fsync = always #mail_home = /vmail/%{user | domain }/%{user | username }/home mail_log_events { delete = yes undelete = yes expunge = yes copy = yes mailbox_delete = yes mailbox_rename = yes flag_change = yes append = yes } mail_log_fields { uid = yes box = yes msgid = yes from = yes flags = yes } #mail_path = /vmail/%{user | domain }/%{user | username } mmap_disable = yes protocols { imap = yes lmtp = yes sieve = yes } sql_driver = mysql submission_relay_host = xxxx.xxxx.xxxxx submission_relay_port = 587 submission_relay_ssl = starttls submission_relay_trusted = yes syslog_facility = local5 mysql localhost { dbname = xxxx password = xxxxx user = postfix } passdb sql { default_password_scheme = PLAIN-MD5 query = SELECT password FROM mailbox WHERE username = '%{user}' } 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 } #namespace inbox { # inbox = yes # prefix = # separator = / # type = private #mailbox Drafts { # auto = subscribe # special_use { # "\\Drafts" = yes # } #} #mailbox Junk { # auto = subscribe # special_use { # "\\Junk" = yes # } #} #mailbox Spam { # special_use { # "\\Junk" = yes # } #} #mailbox Trash { # auto = subscribe # special_use { # "\\Trash" = yes # } #} #mailbox Sent { # auto = subscribe # special_use { # "\\Sent" = yes # } #} #mailbox "Sent Messages" { # special_use { # "\\Sent" = yes # } #} #mailbox "Sent Items" { # special_use { # "\\Sent" = yes # } #} #}
#namespace empty { # prefix = # separator = / # alias_for = inbox # subscriptions = yes # mailbox_list_index_prefix = #}
maildir { broken_filename_sizes = yes mail_path = /vmail/%{user | domain }/%{user | username } mail_home = /vmail/%{user | domain }/%{user | username }/home } service imap-login { restart_request_count = unlimited inet_listener imap { port = 143 } inet_listener imaps { port = 993 ssl = yes } } service lmtp { vsz_limit = 512M unix_listener /var/spool/postfix/private/dovecot-lmtp { group = postfix mode = 0660 user = postfix } } service imap { process_limit = 4096 vsz_limit = 1024 MB } service auth { user = root unix_listener auth-master { group = vmail mode = 0660 user = vmail } unix_listener auth-userdb { group = vmail mode = 0666 user = vmail } unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0660 user = postfix } } service auth-worker { } service dict { unix_listener dict { } } ssl_server { cert_file = /etc/postfix/ssl/server.pem dh_file = /etc/dovecot/dh.pem key_file = /etc/postfix/ssl/server.key } service stats { unix_listener stats-reader { group = vmail mode = 0660 user = vmail } unix_listener stats-writer { group = vmail mode = 0660 user = vmail } } protocol lda { } protocol imap { mail_max_userip_connections = 20 mail_plugins { mail_log = yes notify = yes } } protocol lmtp { mail_plugins { sieve = yes } } service managesieve-login { process_min_avail = 0 restart_request_count = 1 vsz_limit = 64M inet_listener sieve { port = 4190 } } service managesieve { process_limit = 1024 } sieve_script personal { active_path = /vmail/%{user | domain }/%{user | username }/home/.dovecot.sieve driver = file path = /vmail/%{user | domain }/%{user | username }/home/sieve } sieve_script before { path = /vmail/sieve/junk-spam.sieve type = before } sieve_script after { path = /vmail/sieve/junk-spam.sieve type = after }
mail_debug = yes auth_verbose = yes auth_debug = yes auth_debug_passwords = yes log_debug = category=mail
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
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(test@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(test@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 = 'test@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 = 'test@gcmm.net' and active = 1' in 0 msecs Feb 13 12:00:34 auth-worker(test@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(test@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 test@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(test@gcmm.net)<85478><wTxDrAoulrgKAQH3>: Debug: Loading modules from directory: /usr/lib64/dovecot Feb 13 12:00:34 imap(test@gcmm.net)<85478><wTxDrAoulrgKAQH3>: Debug: Module loaded: /usr/lib64/dovecot/lib15_notify_plugin.so Feb 13 12:00:34 imap(test@gcmm.net)<85478><wTxDrAoulrgKAQH3>: Debug: Module loaded: /usr/lib64/dovecot/lib20_mail_log_plugin.so Feb 13 12:00:34 imap(test@gcmm.net)<85478><wTxDrAoulrgKAQH3>: Debug: Added userdb setting: maildir=gcmm.net/test/ Feb 13 12:00:34 imap(test@gcmm.net)<85478><wTxDrAoulrgKAQH3>: Debug: Effective uid=1001, gid=1001, home=/vmail/gcmm.net/test/home Feb 13 12:00:34 imap(test@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(test@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(test@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)
See https://doc.dovecot.org/2.4.0/core/config/mailbox/mail_location.html#per-use...
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(test@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(test@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 = 'test@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 = 'test@gcmm.net' and active = 1' in 0 msecs Feb 13 12:00:34 auth-worker(test@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(test@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 test@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(test@gcmm.net)<85478><wTxDrAoulrgKAQH3>: Debug: Loading modules from directory: /usr/lib64/dovecot Feb 13 12:00:34 imap(test@gcmm.net)<85478><wTxDrAoulrgKAQH3>: Debug: Module loaded: /usr/lib64/dovecot/lib15_notify_plugin.so Feb 13 12:00:34 imap(test@gcmm.net)<85478><wTxDrAoulrgKAQH3>: Debug: Module loaded: /usr/lib64/dovecot/lib20_mail_log_plugin.so Feb 13 12:00:34 imap(test@gcmm.net)<85478><wTxDrAoulrgKAQH3>: Debug: Added userdb setting: maildir=gcmm.net/test/ Feb 13 12:00:34 imap(test@gcmm.net)<85478><wTxDrAoulrgKAQH3>: Debug: Effective uid=1001, gid=1001, home=/vmail/gcmm.net/test/home Feb 13 12:00:34 imap(test@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(test@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(test@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-leave@dovecot.org
Ah, so simple, thanks so much for your help.
On 2/13/2025 12:13 PM, Aki Tuomi wrote:
See https://doc.dovecot.org/2.4.0/core/config/mailbox/mail_location.html#per-use...
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(test@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(test@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 = 'test@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 = 'test@gcmm.net' and active = 1' in 0 msecs Feb 13 12:00:34 auth-worker(test@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(test@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 test@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(test@gcmm.net)<85478><wTxDrAoulrgKAQH3>: Debug: Loading modules from directory: /usr/lib64/dovecot Feb 13 12:00:34 imap(test@gcmm.net)<85478><wTxDrAoulrgKAQH3>: Debug: Module loaded: /usr/lib64/dovecot/lib15_notify_plugin.so Feb 13 12:00:34 imap(test@gcmm.net)<85478><wTxDrAoulrgKAQH3>: Debug: Module loaded: /usr/lib64/dovecot/lib20_mail_log_plugin.so Feb 13 12:00:34 imap(test@gcmm.net)<85478><wTxDrAoulrgKAQH3>: Debug: Added userdb setting: maildir=gcmm.net/test/ Feb 13 12:00:34 imap(test@gcmm.net)<85478><wTxDrAoulrgKAQH3>: Debug: Effective uid=1001, gid=1001, home=/vmail/gcmm.net/test/home Feb 13 12:00:34 imap(test@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(test@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(test@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-leave@dovecot.org
participants (2)
-
Aki Tuomi
-
Asai