0

I setup a postfix/dovecot installation following this ispmail guide on workaround.org

I recently changed my host for a good reason. I followed the very same guide once again. This time, I wound up with a different hostname during the postfix installation. As a result, the mails have a different name (the names in /var/vmail///Maildir/cur look like timestamp.message_id.hostname..., that's why).

e.g.

root@host02:/var/vmail/<domain>/<user>/Maildir/cur# ls
'1608978615.M798258P5416.host01,S=15194,W=15468:2,S'  # this is an old mail I copied over
'1615055139.M60887P11290.host02,S=3857,W=3936:2,S'
'1615057551.M933349P11815.host02,S=1031,W=1061:2,S'

I want to copy the mails from the old location to the new one. When I do that, the mails do not get displayed. However, there appears one mail with empty subject and body in the INBOX using roundcube.

As renaming the mails to match the new hostname do not work, I suspect that I cannot simply copy the single mails. Likely, a Mail must first be processed from the mailqueue to be recognized by dovecot or something?

How would I copy the mails safely to the new server so that they appear next to the new mails I already received?

Thank you in advance and happy codin'.

1
1

The answer was doveadm sync:

doveadm sync -A remote:<ip-adress>

I had to rm the files that I copied earlier (otherwise I would run into a permission error).

They have a neat documentation

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.