[Dovecot] Copying just the folders to new Dovecot server?

Steffen Kaiser skdovecot at smail.inf.fh-brs.de
Fri Dec 14 10:51:34 EET 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, 14 Dec 2012, Bjørn T Johansen wrote:

> I am setting up a new Dovecot server and I want to start from scratch, i.e. with an empty mailbox. But I want to have the same folders in my new mailbox that I have in my old. Is
> there a way to create these folders without manually creating one by one?

Depending on your storage backend you can pre-create the folders. E.g. if 
you use Maildir, you create

mkdir .Folder.Subfolder.Subfolder/new
mkdir .Folder.Subfolder.Subfolder/cur
mkdir .Folder.Subfolder.Subfolder/tmp

touch .Folder.Subfolder.Subfolder/maildirfolder

For current versions of Dovecot, you can use the doveadm tool:

doveadm mailbox create [-A|-u user] [-S socket_path] [-s] mailbox ...

Regards,

- -- 
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBUMrolmoxLS8a3A9mAQJ1fQgAgMkr8Y3hjJp0Tz8fBxl2uztNtN3+5kLC
rMCssNVRm5JT26H3ZIzANRJkR/oGZI9clxvDU/42GTJDQfFLOxb2WTEEp1D0Bk6u
dIwctUoeBbLYVB7u8soxBXoK/uTazOfpNG7zBkVs9q6xxjW2GpL1H193sxDYLIeE
h1KMBduWno8eMlL9BdoY+SWaO5us61KbpOheD53ewSkDlHIev+TG4GKUyG1O0OBr
6ShFXMSh0YqxMkGdPIeNLmV5kZTSHWOq1g430JuXcv2vQar8FFoTtOjw33H/FtTT
ipK0xpXSnU8zX1z+rFHSmRc3IZFISHo0EEkLiW6L9oXVPrB5HxAq0g==
=acka
-----END PGP SIGNATURE-----


More information about the dovecot mailing list