mailcow / mailcow-dockerized

mailcow: dockerized - 🐮 + 🐋 = 💕
https://mailcow.email
GNU General Public License v3.0
8.58k stars 1.15k forks source link

E-Mail restore doesn't work #2593

Closed OriginalXiaomi closed 5 years ago

OriginalXiaomi commented 5 years ago

Greetings!

First up: Mailcow is awesome. Thanks a lot for making my life so much easier.

When I switched my server to another hoster, everything worked out, but now every SOGo account doesn't have the hostname, it looks like that: image

Also, I restored all my data, but no emails show up in SOGo or in gmail. I've double checked and they're actually in /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1, but still, they aren't showing up in SOGo.

Thanks a lot in advance 👍

Edit: I don't really care about the IP address in SOGo as is works with or without it. The emails don't show up anyways.

OriginalXiaomi commented 5 years ago

I can receive and write emails, so I think the problem is in linking the data from vmail to mailcow.

andryyy commented 5 years ago

Hi, you are welcome! :)

If you didn’t see an IP there before, you didn’t update mailcow before moving it. Newer mailcows list the IP instead of the hostname. I don’t really think that’s the problem here anyway, just to clarify why you see the IP.

I cannot help any further, as you deleted the issue template and didn’t provide any container logs. :/

Please attach sogo-mailcow, dovecot-mailcow and mysql-mailcow logs. Limit the logs to the time you try to access your mails. Don’t post all logs, please. :)

How did you move your installation by the way?

andryyy commented 5 years ago

Probably wrong MySQL credentials. Try to reset them as described in the docs. If you did it manually somehow, it probably broke or they changed.

Make sure mailcow.conf is a symlink to .env too.

I think it is just a SQL credentials issue. If not, I’m not able to help you here.

nk-87 commented 5 years ago

For the database - I believe the username and password in the mailcow.conf file of your backup needs to match the credentials on the host's mailcow.conf.

For the missing emails, if you're coming from an old or long running host, it restores them to /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/<domain>/<mailbox>, but it needs to go into another directory within it: /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/<domain>/<mailbox>/Maildir.

I had to empty Maildir and move all the folder directories and Dovecot files in it to get my mail to show up.

Braintelligence commented 5 years ago

@OriginalXiaomi Did you solve your problem or find a workaround?

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

bobskee commented 4 years ago

For the database - I believe the username and password in the mailcow.conf file of your backup needs to match the credentials on the host's mailcow.conf.

For the missing emails, if you're coming from an old or long running host, it restores them to /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/<domain>/<mailbox>, but it needs to go into another directory within it: /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/<domain>/<mailbox>/Maildir.

I had to empty Maildir and move all the folder directories and Dovecot files in it to get my mail to show up.

This fixed it for me! Thanks

andryyy commented 4 years ago

yep, copy the mailcow.conf! :)

It will prepend or leave the Maildir prefix. It is all in your original mailcow.conf

johanvandyck commented 3 years ago

Hi I stumbled on the same issue. I was forced to reinstall my mailcow from scratch, but while importing I encountered the above bug/feature of the restore function.

_For the missing emails, if you're coming from an old or long running host, it restores them to /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data//, but it needs to go into another directory within it: /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/data///Maildir.

I like to make a resume, as the above text was not clear to me on first read.

Regards

Johan.