Changed location of index files
Hello.
After upgrading to version 2.4, index files were moved to the user's
home directory, and the mail_path = ~/mail parameter was no longer
taken into account when processing index files.
In addition, indexes for the INBOX folder no longer respect the
mail_index_path= parameter and are stored in the
./INBOX/dovecot.index.* folder, although they should be stored in the
same folder where the messages are stored, given the current
configuration.
My configuration:
mail_home =
mail_inbox_path =
mail_index_path =
mail_path = ~/mail
userdb declarative {
passwd_file_path = /var/data/mail/dovecot/passdb
driver = passwd-file
fields {
home = /var/data/mail/vmail/%{user | domain}/%{user | username}
mail_index_path = /var/data/mail/vmail/%{user | domain }/%{user | username}
}
}
Current location of index files:
/var/data/mail/vmail/example.com/user
├── INBOX
│ ├── dovecot.index.cache
│ └── dovecot.index.log
├── Sent
│ ├── dovecot.index.cache
│ └── dovecot.index.log
├── Drafts
│ └── dovecot.index.log
├── Junk
│ └── dovecot.index.log
├── Trash
│ ├── dovecot.index.cache
│ └── dovecot.index.log
├── dovecot.list.index
├── dovecot.list.index.log
└─── mail
├── cur
├── new
├── tmp
├── Sent
│ ├── cur
│ ├── new
│ ├── tmp
│ └── dovecot-uidlist
├── Drafts
│ ├── cur
│ ├── new
│ ├── tmp
│ └── dovecot-uidlist
├── Junk
│ ├── cur
│ ├── new
│ ├── tmp
│ └── dovecot-uidlist
├── Trash
│ ├── cur
│ ├── new
│ ├── tmp
│ └── dovecot-uidlist
├── subscriptions
├── dovecot.mailbox.log
├── dovecot-uidlist
├── dovecot-uidvalidity
└── dovecot-uidvalidity.69d94118
Expected location of index files according to configuration:
/var/data/mail/vmail/example.com/user
└─── mail
├── cur
├── new
├── tmp
├── Sent
│ ├── cur
│ ├── new
│ ├── tmp
│ ├── dovecot.index
│ ├── dovecot.index.cache
│ ├── dovecot.index.log
│ └── dovecot-uidlist
├── Drafts
│ ├── new
│ ├── tmp
│ ├── cur
│ ├── dovecot.index
│ ├── dovecot.index.cache
│ ├── dovecot.index.log
│ └── dovecot-uidlist
├── Junk
│ ├── new
│ ├── tmp
│ ├── cur
│ ├── dovecot.index
│ ├── dovecot.index.cache
│ ├── dovecot.index.log
│ └── dovecot-uidlist
├── Trash
│ ├── cur
│ ├── new
│ ├── tmp
│ ├── dovecot.index
│ ├── dovecot.index.cache
│ ├── dovecot.index.log
│ └── dovecot-uidlist
├── dovecot.index
├── dovecot.index.cache
├── dovecot.index.log
├── dovecot.list.index
├── dovecot.list.index.log
├── dovecot.mailbox.log
├── dovecot-uidlist
├── dovecot-uidvalidity
├── dovecot-uidvalidity.69d94118
└── subscriptions
-- Best regards, Lafiel Elentari mailto:lafiel@elven.pw
On 11/05/2026 14:52 EEST Lafiel Elentari via dovecot <dovecot@dovecot.org> wrote:
Hello.
After upgrading to version 2.4, index files were moved to the user's home directory, and the
mail_path = ~/mailparameter was no longer taken into account when processing index files.In addition, indexes for the
INBOXfolder no longer respect themail_index_path=parameter and are stored in the./INBOX/dovecot.index.*folder, although they should be stored in the same folder where the messages are stored, given the current configuration.My configuration:
mail_home = mail_inbox_path = mail_index_path = mail_path = ~/mail userdb declarative { passwd_file_path = /var/data/mail/dovecot/passdb driver = passwd-file fields { home = /var/data/mail/vmail/%{user | domain}/%{user | username} mail_index_path = /var/data/mail/vmail/%{user | domain }/%{user | username} } }
Hi!
Try adding userdb_ to mail_index_path. Home is special.
Keys which begin with a userdb_ prefix are used for userdb, others are used for passdb. https://doc.dovecot.org/2.4.3/core/config/auth/databases/passwd_file.html#co...
Aki
Hello.
Thanks! This variant working:
userdb__mail_index_path = /var/data/mail/vmail/%{user | domain }/%{user | username}
For other parameters, do I also need to add userdb_? Example:
userdb declarative {
userdb_driver = passwd-file
userdb_passwd_file_path = /var/data/mail/dovecot/passdb
userdb_fields {
userdb_gid = 5000
userdb_home = /var/data/mail/vmail/%{user | domain}/%{user | username}
userdb_uid = 5000
userdb_mail_index_path = /var/data/mail/vmail/%{user | domain }/%{user | username}
}
}
How to move location of the .dovecot.lda-dupes files to the mail
subdirectory?
You wrote on 2026.05.11, at 14:58:48:
Hi!
Try adding userdb_ to mail_index_path. Home is special.
Keys which begin with a userdb_ prefix are used for userdb, others are used for passdb. https://doc.dovecot.org/2.4.3/core/config/auth/databases/passwd_file.html#co...
Aki
-- Best regards, Lafiel Elentari mailto:lafiel@elven.pw
participants (2)
-
Aki Tuomi
-
Lafiel Elentari