[Dovecot] Copying just the folders to new Dovecot server?
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?
Regards,
BTJ
--
Bjørn T Johansen
btj@havleik.no
Someone wrote: "I understand that if you play a Windows CD backwards you hear strange Satanic messages" To which someone replied: "It's even worse than that; play it forwards and it installs Windows"
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
-----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-----
On Fri, 14 Dec 2012 09:51:34 +0100 (CET) Steffen Kaiser <skdovecot@smail.inf.fh-brs.de> wrote:
-----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
Thx but I then still need to do it manually.. But I think I will do it manually anyway, so I can do some cleanup at the same time... :)
BTJ
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
participants (2)
-
Bjørn T Johansen
-
Steffen Kaiser