mailcow / mailcow-dockerized

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

Move only one domain in vmail to another storage device #4217

Closed alexyz41 closed 3 years ago

alexyz41 commented 3 years ago

Hello,

I followed the steps ("new way") on https://mailcow.github.io/mailcow-dockerized-docs/u_e-dovecot-vmail-volume/ but instead of moving the entire folder, I just moved one folder corresponding to one domain.

  1. I renamed the folder from /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/domain.com to domain.com-old
  2. I created a symblink to /mnt/new-volume/domain.com
  3. Changed owner of link to user with id 5000
  4. Copied all contents of domain.com-old to /mnt/new-volume/domain.com

I started again with docker-compose up -d and tried to create a new mailbox in that domain, and it success, but when I try to log in to that mailbox, it says that an internal error happened. Here are the logs:

dovecot-mailcow_1 | Aug 7 20:21:03 webmail dovecot: imap(alejandrotest@saceco.es)<297><7+z3NvzI/pGsFgH4>: Error: Mailbox INBOX: Failed to autocreate mailbox: Internal error occurred. Refer to server log for more information. [2021-08-07 20:21:03]

dovecot-mailcow_1 | Aug 7 20:21:03 webmail dovecot: imap(alejandrotest@domain.es)<297><7+z3NvzI/pGsFgH4>: Error: mkdir(/var/vmail/domain.es/alejandrotest/Maildir) failed: No such file or directory

sogo-mailcow_1 | Aug 7 20:21:03 d9e2fae20157 sogod [126]: [ERROR] <0x0x5641ce7b3860[NGImap4Connection]> could not select URL: imap://alejandrotest%40domain.es@172.22.1.250/INBOX/?tls=NO&tlsVerifyMode=default: {RawResponse = "{ResponseResult = {description = \" Internal error occurred. Refer to server log for more information. [2021-08-07 20:21:03] (0.001 + 0.000 + 0.001 secs).\"; flag = SERVERBUG; result = no; tagId = 6; }; }"; access = SERVERBUG; reason = " Internal error occurred. Refer to server log for more information. [2021-08-07 20:21:03] (0.001 + 0.000 + 0.001 secs)."; result = 0; }

Is it a permission error? I don't really see where is the error since I set all folders to be owned by user with ID 5000.

Any help would be appreciated.

Thanks

andryyy commented 3 years ago

Hi,

Please post support questions here: https://community.mailcow.email/

Symbolic links will not work. Try a bind mount like mount -o bind /some/where /else/where

alexyz41 commented 3 years ago

It works, thanks!!