Solved

need assistance migrating dovecot mailboxes to new server

Posted on 2013-12-30
4
757 Views
Last Modified: 2014-01-13
I am retiring a MAC-Mini server, running Lion and need to migrate a few mailboxes to the a new MAC-Mini, running Mavericks.

The mailbox path/structure and user IDs are different between the two.

Here is what I have for layouts and IDs:

(Old Server)

Each mailbox is located in the following location:

/private/var/spool/imap/dovecot/mail/


drwx------  20 ray                       mail  680 Dec 27 07:47 0673B754-B555-4582-9788-1905B39BD1CF
drwx------   9 com.apple.calendarserver  mail  306 Dec  1  2011 54EFD52E-6A89-44A7-9126-1140E195B5E4
drwx------  10 raymond                   mail  340 Jan 28  2013 59F4C957-2BC1-4B3D-B21B-767FE2960746
drwx------   9 ical_server               mail  306 Nov 18 11:40 C6BECE93-A7DC-4840-9B08-033C01792DB6
drwx------  22 pete                      mail  748 Dec 30 10:17 C9048DCC-1346-4993-A877-99369050D86F
drwx------  11 _calendar                 mail  374 Nov 20 11:20 FFFFEEEE-DDDD-CCCC-BBBB-AAAA0000005D


Example of folders and files within each mailbox folder:

ls -a /private/var/spool/imap/dovecot/mail/C9048DCC-1346-4993-A877-99369050D86F
.                        .mailJunk                  dovecot.index.cache
..                        .mailTrash                  dovecot.index.log
.Deleted Messages            cur                        maildirsize
.Drafts                        dovecot-keywords            new
.Junk                        dovecot-uidlist                  subscriptions
.Notes                        dovecot-uidvalidity            tmp
.Sent Messages                  dovecot-uidvalidity.4ed7ff04
.Trash                        dovecot.index


---------------------------
Usernames with IDs



peteroyer                       507 (pete mailbox)
raymond                         501



New Server layout:


Path to mail boxes


/Library/Server/Mail/Data/mail/users/username/

ls -l

drwx------  2 _dovecot  mail     68 Dec 17 15:36 cur
-rw-------  1 _dovecot  mail      0 Dec 17 15:36 dovecot-acl-list
-rw-------  1 _dovecot  mail    105 Dec 17 15:36 dovecot-uidlist
-rw-------  1 _dovecot  mail      8 Dec 17 15:36 dovecot-uidvalidity
-r--r--r--  1 _dovecot  mail      0 Dec 17 15:36 dovecot-uidvalidity.52b0c3d3
-rw-------  1 _dovecot  mail    648 Dec 17 15:36 dovecot.index.cache
-rw-------  1 _dovecot  mail    456 Dec 17 15:36 dovecot.index.log
-rw-------@ 1 _dovecot  mail  18432 Dec 17 15:36 dovecot.skindex
-rw-------  1 _dovecot  mail      0 Dec 17 15:36 dovecot.sklock
-rw-------  1 _dovecot  mail      0 Dec 17 15:36 maildirfolder
-rw-------  1 _dovecot  mail     10 Dec 17 15:36 maildirsize
drwx------  3 _dovecot  mail    102 Dec 17 15:36 new
drwx------  2 _dovecot  mail     68 Dec 17 15:36 tmp



UniqueID:
pete                       502
ray                        504
raymond                    501



My goal is to import the existing mailboxes to the new server and make necessary changes to files and folders for proper permissions and new user IDs
0
Comment
Question by:tamray_tech
  • 3
4 Comments
 
LVL 28

Expert Comment

by:Jan Springer
ID: 39746499
when i've migrated (linux not osx but similar), i

1) create all accounts on the new machine
2) tar each individual account directory (getting all subdirectories)
3) tar any generic mail directory
4) transfer and verify a few accounts

then i schedule a downtime (shut off your MTA and dovecot), re-tar and transfer the data.
0
 

Author Comment

by:tamray_tech
ID: 39751599
Tried that, but I believe there is an issue with the database. In the following list of messages, only those sent today are displayed in the users mail client. I need all folders and messages to show up.  All permissions are correct on the files below:

mail-2:cur root# ls -l
total 128
-rw-------  1 _dovecot  mail   1398 Dec 17 14:32 1387312359.M31044P45445.mail.domain,S=1398,W=1428:2,ST
-rw-------  1 _dovecot  mail  34941 Dec 19 08:09 1387462178.M552894P10083.mail.domain,S=34941,W=35349:2,ST
-rw-------  1 _dovecot  mail   8075 Dec 20 15:34 1387575267.M898011P52138.mail.domain,S=8075,W=8234:2,ST
-rw-------  1 _dovecot  mail   5813 Dec 26 00:10 1388038212.M972176P22064.mail.domain,S=5813,W=5927:2,ST
-rw-------  1 _dovecot  mail   3467 Jan  2 10:28 1388680099.M114308P15988.mail.domain,S=3467,W=3542:2,S
-rw-------  1 _dovecot  mail   3434 Jan  2 10:31 1388680278.M267619P16164.mail.domain,S=3434,W=3509:2,S
0
 

Accepted Solution

by:
tamray_tech earned 0 total points
ID: 39765526
resolved issue by using imapcopy
0
 

Author Closing Comment

by:tamray_tech
ID: 39776080
Resolved the issue
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Automapping, a wonderful feature with Exchange 2010 (SP2 onwards I believe), allows additional/Shared mailboxes that a user has access to be automatically mapped on Outlook client, simplifying the process by adding them while Outlook launches. Ho…
In this article we will discuss some EI Capitan Mail app issues and provide some manual process to resolve them.
In this video we show how to create a Shared Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Sha…
In this video we show how to create an Address List in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Organization >> Ad…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now