1

(Bear with me, the whole idea of email setup is new for me)

I have a server configured with postfix, dovecot and roundcube, everything is set u correctly.

On the old server (Also using postfix), all the mails are in one file, I tried to migrate them to the new server(i.e copy the file to the new path of /var/spool/mail/$user and /var/mail/$user).

If I use from the terminal the command mail I can see the mails on the new server.

But when I try to access from roundcube, i get "Mailbox is empty"

I can see my sent mails in the folder /home/$user/mail/.Sent/cur/....

But each mail is a single file

Is there anything I'm missing, is the issue with dovecot because it uses another structure for the mails or something ?

2 Answers 2

1

First, let me clarify some basics for you.

  • Mailbox format is the format you have on the old server. Its literally multiple message in one file
  • Maildir format is the format you see in your home directory. These cur and other folders relates to this format.

If I guess correctly, you have a setup on the old server that tells to Dovecot to use mailbox format and read mailboxes from /var/spool/mail/$user, in the new server, the Dovecot is configured to use Maildir format and store them at /home/$user/mail. This can be configurable in the Dovecot config files, but I recommend you to do not touch it, since Maildir is better and Dovecot has a really good support for it.

All you have to do is install a mb2md utility on the new machine, convert all mailboxes to maildir format (before this, read its manual carefully) and transfer the resulting maildirs into the proper places.

I also recommend you to examine the Dovecot config files how it's configured currently and how can you potentially change the location of the maildir if/when you need it.

1
  • This was exactly the case. Thank you for the explanation, doing mb2md -m did the job
    – Dany Y
    Jun 4, 2020 at 7:54
0

One option is to use imapsync utility to move the e-mails from old server to new server. This way you don't need to perform slightly risky data conversions.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .