Dovecot 2.3.8 - How to force index creation for user/mailbox?

Sami Ketola sami.ketola at dovecot.fi
Wed Dec 4 17:31:16 EET 2019



> On 4 Dec 2019, at 17.15, Tomek Lutelmowski via dovecot <dovecot at dovecot.org> wrote:
> 
> Someone who have mailbox in different directory than indexes, can confirm if doveadm can recreate index (after deleting dovecot.index* files) or these files can be created only by connecting with IMAP client? 
> 


[root at example .INBOX]# pwd
/vmail/sami at example.com/index/.INBOX
[root at example .INBOX]# ls
dovecot.index  dovecot.index.cache  dovecot.index.log
[root at example .INBOX]# rm dovecot.index.log 
rm: remove regular file ‘dovecot.index.log’? y
[root at example .INBOX]# doveadm force-resync -u sami INBOX
[root at example .INBOX]# ls -al
total 8228
drwx------  2 vmail vmail      76 Dec  4 15:22 .
drwx------ 13 vmail vmail    4096 Nov 25 08:58 ..
-rw-------  1 vmail vmail  164080 Dec  4 15:22 dovecot.index
-rw-------  1 vmail vmail 8247872 Dec  4 15:21 dovecot.index.cache
-rw-------  1 vmail vmail     252 Dec  4 15:22 dovecot.index.log

[root at example .INBOX]# rm dovecot.index.*
rm: remove regular file ‘dovecot.index.cache’? y 
rm: remove regular file ‘dovecot.index.log’? y

[root at example .INBOX]# doveadm index -u sami INBOX
[root at example .INBOX]# doveadm force-resync -u sami INBOX

[root at example .INBOX]# ls -al
total 180
drwx------  2 vmail vmail     76 Dec  4 15:27 .
drwx------ 13 vmail vmail   4096 Nov 25 08:58 ..
-rw-------  1 vmail vmail 164080 Dec  4 15:27 dovecot.index
-rw-------  1 vmail vmail   5748 Dec  4 15:27 dovecot.index.cache
-rw-------  1 vmail vmail    308 Dec  4 15:27 dovecot.index.log

[root at example .INBOX]# doveconf -n | grep mail_location
mail_location = Maildir:/vmail/%u/Maildir:INDEX=/vmail/%u/index

[root at ketola .INBOX]# doveadm user sami | grep home
home    /vmail/sami at example.com

Sami
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dovecot.org/pipermail/dovecot/attachments/20191204/1a8b3d86/attachment.html>


More information about the dovecot mailing list