I want to migrate from a non-hashed storage to a hashed storage. So I set this up:
mail_location = mdbox:/srv/vmail/%2.256Hu/%Lu/mdbox:ALT=/srv/vmail/%Ld/%Ln/mdbox I rsynced the "old" mdbox-style mailbox from another machine to to /srv/vmail/%Ld/%Ln/mdbox (/srv/vmail/charite.de/ralf.hildebrandt/mdbox in my case) The mail_location /srv/vmail/c5/[email protected] was non-existing. Then I connected using IMAP and tried to have a look at the INBOX: Sep 27 11:15:15 imap([email protected]): Debug: Effective uid=10000, gid=10000, home=/srv/vmail/c5/[email protected] Sep 27 11:15:15 imap([email protected]): Debug: Home dir not found: /srv/vmail/c5/[email protected] Sep 27 11:15:15 imap([email protected]): Debug: Namespace inbox: type=private, prefix=, sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes location=mdbox:/srv/vmail/c5/[email protected]/mdbox:ALT=/srv/vmail/charite.de/ralf.hildebrandt/mdbox Sep 27 11:15:15 imap([email protected]): Debug: fs: root=/srv/vmail/c5/[email protected]/mdbox, index=, indexpvt=, control=, inbox=, alt=/srv/vmail/charite.de/ralf.hildebrandt/mdbox Sep 27 11:15:15 imap([email protected]): Debug: Namespace : /srv/vmail/c5/[email protected]/mdbox doesn't exist yet, using default permissions Sep 27 11:15:15 imap([email protected]): Debug: Namespace : Using permissions from /srv/vmail/c5/[email protected]/mdbox: mode=0700 gid=default Sep 27 11:15:15 imap([email protected]): Debug: Namespace : /srv/vmail/c5/[email protected]/mdbox/mailboxes/INBOX doesn't exist yet, using default permissions Sep 27 11:15:15 imap([email protected]): Debug: Namespace : Using permissions from /srv/vmail/c5/[email protected]/mdbox: mode=0700 gid=default Sep 27 11:15:15 imap([email protected]): Error: Mailbox INBOX has existing files in alt path, rebuilding storage to avoid losing messages Sep 27 11:15:15 imap([email protected]): Error: Failed to autocreate mailbox INBOX: Internal error occurred. Refer to server log for more information. [2014-09-27 11:15:15] Sep 27 11:15:15 imap([email protected]): Warning: fscking index file /srv/vmail/c5/[email protected]/mdbox/storage/dovecot.map.index Sep 27 11:15:15 imap([email protected]): Info: Disconnected: Logged out in=58 out=623 What is "Mailbox INBOX has existing files in alt path, rebuilding storage to avoid losing messages" referring to? And why is this an error? After all that I reconnect, just to find an empty inbox. WTF? Why is the ALT storage being ignored? The ALT storage contains: total 8 drwxr-xr-x 6 vmail vmail 4096 Aug 18 15:25 mailboxes drwxr-xr-x 2 vmail vmail 4096 Sep 24 00:37 storage and those two directories contain: mailboxes: total 16 drwxr-xr-x 3 vmail vmail 4096 Aug 18 15:25 Drafts drwxr-xr-x 3 vmail vmail 4096 Aug 18 15:25 INBOX drwxr-xr-x 3 vmail vmail 4096 Aug 18 15:25 Sent drwxr-xr-x 3 vmail vmail 4096 Aug 18 15:25 Trash storage: -rw-r--r-- 1 vmail vmail 3552 Sep 25 14:47 dovecot.map.index.log -rw-r--r-- 1 vmail vmail 20015 Sep 25 13:51 m.1 On the other hand, just moving /srv/vmail/charite.de/ralf.hildebrandt/mdbox to /srv/vmail/c5/[email protected] worked like a charm! -- [*] sys4 AG http://sys4.de, +49 (89) 30 90 46 64 Franziskanerstraße 15, 81669 München Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Marc Schiffbauer Aufsichtsratsvorsitzender: Florian Kirstein
