Migrating user emails from one server to another?

Discussion in 'General' started by lonerunner, Dec 30, 2018.

  1. lonerunner

    lonerunner Member

    I am trying to migrate all of my users from one server to another, now i don't have many websites (5 of them) so it's not an issue to go manually, when i create account to second server i add user, configure everything as it was on first server and get passwords from database.

    But mail folders are confusing me a bit, they are different so i don't know what should i copy, and what to keep on new server. There are few files with dovecot index, keyword, idlist, subs, and so on... Some of these files don't exist on new server but .sieve file do exist, so i don't know is it safe to overwrite and delete, or need to keep those files on new server not overwritten.

    Here is a look on one maildir folder.

    33.PNG 34.PNG
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Copy over the whole mailbox with all files: /var/vmail/domain.tld/user/
  3. lonerunner

    lonerunner Member

    Ok it works, i can read all mails but now i get an error like this

    Dec 31 08:03:44 ns1 dovecot: lmtp([email protected]): Error: LHOnMGDNKVyWYAAAsDTJtQ: sieve: file storage: Failed to stat sieve storage path: stat(/var/vmail/domain.tld/user/.sieve) failed: Permission denied (euid=5006(web5) egid=5000(vmail) stat(/var/vmail/domain.tld/user/.sieve) failed: Permission denied)
    Dec 31 08:03:44 ns1 dovecot: lmtp([email protected]): Error: LHOnMGDNKVyWYAAAsDTJtQ: sieve: Failed to access active Sieve script in user storage `/var/vmail/domain.tld/user/sieve'
    There is a difference between new and old server. Old one just have file with .sieve in user mail folder, but on new one, that file links for folder sieve and folder contain ispconfig.sieve file inside.

    On old server everything is owned by wmail, on new one .sieve is owned by root, user folder and all files inside are owned by user, and sieve folder is owned by wmail.


    I get it i could fix by setting proper permissions, but what is correct one, user or wmail permission, and this is how it is generated for each mail upon creation.

    EDIT: I did Resync in ispconfig and it setup proper permissions, so now errors are gone.
    Last edited: Dec 31, 2018

Share This Page