How to import a backup of Maildir into Mailcow instance?

I have a backup of one of my email accounts in the Maildir format. I made it manually, and it’s not from a Mailcow instance.

How to import such a backup into a Mailcow? Will I also have to create a domains and mailboxes that exist in a backup in Mailcow first?

I’m aware of the 2 import/export bash scripts of Mailcow, however, can they be used in this case?

13 points · 3 comments · view on lemmy.world

3 Comments

lnxtx@feddit.nl · 1 pts · 2y (2 replies)

Yeah, first create domains and mailboxes.

Then you can find user's Maildirs here for example:

/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/DOMAIN/USERNAME/Maildir

If you done with the restore, remember to execute:

docker exec mailcowdockerized_dovecot-mailcow_1 chown -R vmail:vmail /var/vmail
docker exec mailcowdockerized_dovecot-mailcow_1 /usr/bin/doveadm quota recalc -A
salvador@lemmy.world · 1 pts · 2y (1 reply)

But the mailboxes of MailCow are always encrypted

lnxtx@feddit.nl · 1 pts · 2y

Ohh, I didn't know that.

But:

The key pair can be found in crypt-vol-1. Please don't forget to backup this and other volumes.[1]

[1] https://docs.mailcow.email/