Migrated email users to new server but /var/vmail issue

Discussion in 'Installation/Configuration' started by baggerone, May 1, 2015.

  1. baggerone

    baggerone New Member

    Hello - I did a remote import of email users via the TOOLS > IMPORT > ISPConfig 3 email from one server to another. That worked fine. I then did a tar cvf on /var/vmail/* and created the tar file, ftp'ed it over to the new server, tar xvf'ed the tar file and everything looks good so far.

    directory is the same... /var/vmail/<domain>/<user>/cur for example is the same on both servers. the files look the same, with the same permissions too:
    OLD SERVER:
    <<
    -rw-r--r-- 1 vmail vmail 4329 Dec 31 2011 1329510361.M364575P30865V0000000
    00000FD00I00000000000E3224_0.ns1.doit.net,S=4329:2,S
    -rw-r--r-- 1 vmail vmail 5966 Jul 8 2011 1329510362.M434304P30865V0000000
    00000FD00I00000000000E372B_3.ns1.doit.net,S=5966:2,S
    -rw-r--r-- 1 vmail vmail 3574174 Sep 27 2011 1329510363.M244377P30865V0000000
    00000FD00I00000000000E388C_5.ns1.doit.net,S=3574174:2,S
    -rw-r--r-- 1 vmail vmail 31585 Oct 10 2011 1329510403.M999846P30865V0000000
    00000FD00I00000000000E3890_6.ns1.doit.net,S=31585:2,S
    >>
    NEW SERVER:
    <<
    -rw-r--r-- 1 vmail vmail 4329 Dec 31 2011 1329510361.M364575P30865V0000000
    00000FD00I00000000000E3224_0.ns1.doit.net,S=4329:2,S
    -rw-r--r-- 1 vmail vmail 5966 Jul 8 2011 1329510362.M434304P30865V0000000
    00000FD00I00000000000E372B_3.ns1.doit.net,S=5966:2,S
    -rw-r--r-- 1 vmail vmail 3574174 Sep 27 2011 1329510363.M244377P30865V0000000
    00000FD00I00000000000E388C_5.ns1.doit.net,S=3574174:2,S
    -rw-r--r-- 1 vmail vmail 31585 Oct 10 2011 1329510403.M999846P30865V0000000
    00000FD00I00000000000E3890_6.ns1.doit.net,S=31585:2,S
    >>

    Now, i go into my email client, change the server, keep the same login credentials and send a test email, it works fine. in the logs, i see where the user on the NEW SYSTEM is authenticating and sending/receiving email.

    However, these users have a LOT of back email. They use IMAP and have thousands of emails in their folder. In the email client, all i'm seeing is NEW EMAIL! None of the old email, despite it still being in the cur/ directory.

    Why is this? How can I get the email client to display all the email in the IMAP folders....?!? HELP!!!!
     
  2. baggerone

    baggerone New Member

    I think i have found it..... on the old server, the location is in /var/vmail/<domain>/<user>/cur in the new system, it's /var/vmail/<domain>/<user>/Maildir/cur

    i'm not sure why Maildir/ is in there, but how do I do this? luckily, i don't have a ton of users to correct and migrate -- but i would like to get this solved in a more automated way than to go into each user's mail directory, tar up the files, move it where i need it, untar.

    Any ideas how I can solve this?
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    The problem is that you switched the imap damein. The format n the ld server id from courier, the format on the new server is for dovecot. Search for courier to impa migration here in the forum, there are several threads and a script to convert the folders available.
     
  4. baggerone

    baggerone New Member

    I need a little bit more help.... Thanks for pointing me in the right direction. I downloaded the courier-dovecot-migrate.pl file but it didn't quite work. It saw the mailboxes for one of my users (using only one as a test):

    <<
    [root@dakota tmp]# /tmp/courier-dovecot-migrate.pl --to-dovecot --convert --recursive /var/vmail/ricspics.net
    Converting to Dovecot format
    Finding maildirs under /var/vmail/ricspics.net
    /var/vmail/ricspics.net/epayne/.Junk: No imap/pop3 uidlist files
    /var/vmail/ricspics.net/epayne/.Drafts: No imap/pop3 uidlist files
    /var/vmail/ricspics.net/epayne/.Trash: No imap/pop3 uidlist files
    /var/vmail/ricspics.net/epayne/.Sent: No imap/pop3 uidlist files
    /var/vmail/ricspics.net/epayne/./subscriptions already exists, not overwritten

    Total: 1 mailboxes / 1 users
    0 errors
    1 dovecot-uidlist files written

    WARNING: Badly done migration will cause your IMAP and/or POP3 clients to re-download all mails. Read http://wiki.dovecot.org/Migration carefully.
    >>

    but it didn't actually create the Maildir directory....

    <<
    [root@dakota ricspics.net]# cd epayne/
    [root@dakota epayne]# dir
    courierimapsubscribed cur new tmp
    courierpop3dsizelist dovecot-uidlist subscriptions
    >>

    What did I do wrong?
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats not the right tool. I meant the courier to dovecot script for ispconfig that I posted in several threads here in the forum.
     

Share This Page