Copying from a previous Dovecot server

Steffen Kaiser skdovecot at inf.h-brs.de
Wed Oct 31 08:34:45 EET 2018


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

On Tue, 30 Oct 2018, Peter Lindgren wrote:

> Hello!
> I have installed a new dovecot server on a new server, using imap and 
> Maildir.
> The old Maildirs are accessible on a mounted disk.
> I have tried to copy a few folders manually, by first creating the folder on 
> the new server through the a-mail client, and then copying the contents of 
> the cur folder from the old to the new. Works fine, but is a manual process. 
> I'm looking for a way to script this.

if you do not change the names of the mailboxes, copy the whole Maildir 
directory from old to new. Dovecot updates all files. At the first access 
of a mailbox, you probably see a "broken" warning and the repair takes 
place.

The warning and repair can probably be forced by doveadm index.

If you already added ACLs or something like that, you probably need to 
backup some files from the new Maildir.

> Is it safe to copy a template folder to a new folder, and then copy the cur 
> folder contents? The files that Dovecot creates in an empty folder have 
> different contents, will Dovecot update them when the user retrieves the 
> mails in that folder?
>
> Or, can I just make a symlink to the old Maildir somewhere?
>
> Peter
>

- -- 
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEVAwUBW9lNBcQnQQNheMxiAQKrAggAvrcWrBuf9H72U4aOQd8SoiZTzuLpVuTV
lZah7ccYzQS62sfun+y49XndNiWWEIVLP3t7C6HPqiW1b4mr8+Hs56GhZOUac9kx
wih4CxROR4/75/Gzs3varoDYVaR1MmMkc15YE/sglmw4RbDhuX6PK3mct5Z7QzVr
sObSL+TuhLhGvzJiLJftknoiov3w44NeLKLNYweeISJ8D1vW/Xzc4B3LItPwXI/n
bhlZ619GdzHO5mSJmXZYTOEirn10XYMsesV3UKEy6ncr2txeprkTCaGe9CyPNXKf
giQm17LfgdGUpLEKQDx6BkCviMQWDOiw7Z60R9QDTS7YoeylIiZ8Gw==
=+S4G
-----END PGP SIGNATURE-----


More information about the dovecot mailing list