tamray_tech
asked on
need assistance migrating dovecot mailboxes to new server
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/do vecot/mail /
drwx------ 20 ray mail 680 Dec 27 07:47 0673B754-B555-4582-9788-19 05B39BD1CF
drwx------ 9 com.apple.calendarserver mail 306 Dec 1 2011 54EFD52E-6A89-44A7-9126-11 40E195B5E4
drwx------ 10 raymond mail 340 Jan 28 2013 59F4C957-2BC1-4B3D-B21B-76 7FE2960746
drwx------ 9 ical_server mail 306 Nov 18 11:40 C6BECE93-A7DC-4840-9B08-03 3C01792DB6
drwx------ 22 pete mail 748 Dec 30 10:17 C9048DCC-1346-4993-A877-99 369050D86F
drwx------ 11 _calendar mail 374 Nov 20 11:20 FFFFEEEE-DDDD-CCCC-BBBB-AA AA0000005D
Example of folders and files within each mailbox folder:
ls -a /private/var/spool/imap/do vecot/mail /C9048DCC- 1346-4993- A877-99369 050D86F
. .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.4ed7ff 04
.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.52b0c3 d3
-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
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/do
drwx------ 20 ray mail 680 Dec 27 07:47 0673B754-B555-4582-9788-19
drwx------ 9 com.apple.calendarserver mail 306 Dec 1 2011 54EFD52E-6A89-44A7-9126-11
drwx------ 10 raymond mail 340 Jan 28 2013 59F4C957-2BC1-4B3D-B21B-76
drwx------ 9 ical_server mail 306 Nov 18 11:40 C6BECE93-A7DC-4840-9B08-03
drwx------ 22 pete mail 748 Dec 30 10:17 C9048DCC-1346-4993-A877-99
drwx------ 11 _calendar mail 374 Nov 20 11:20 FFFFEEEE-DDDD-CCCC-BBBB-AA
Example of folders and files within each mailbox folder:
ls -a /private/var/spool/imap/do
. .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.4ed7ff
.Trash dovecot.index
--------------------------
Usernames with IDs
peteroyer 507 (pete mailbox)
raymond 501
New Server layout:
Path to mail boxes
/Library/Server/Mail/Data/
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.52b0c3
-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
ASKER
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.ma il.domain, S=1398,W=1 428:2,ST
-rw------- 1 _dovecot mail 34941 Dec 19 08:09 1387462178.M552894P10083.m ail.domain ,S=34941,W =35349:2,S T
-rw------- 1 _dovecot mail 8075 Dec 20 15:34 1387575267.M898011P52138.m ail.domain ,S=8075,W= 8234:2,ST
-rw------- 1 _dovecot mail 5813 Dec 26 00:10 1388038212.M972176P22064.m ail.domain ,S=5813,W= 5927:2,ST
-rw------- 1 _dovecot mail 3467 Jan 2 10:28 1388680099.M114308P15988.m ail.domain ,S=3467,W= 3542:2,S
-rw------- 1 _dovecot mail 3434 Jan 2 10:31 1388680278.M267619P16164.m ail.domain ,S=3434,W= 3509:2,S
mail-2:cur root# ls -l
total 128
-rw------- 1 _dovecot mail 1398 Dec 17 14:32 1387312359.M31044P45445.ma
-rw------- 1 _dovecot mail 34941 Dec 19 08:09 1387462178.M552894P10083.m
-rw------- 1 _dovecot mail 8075 Dec 20 15:34 1387575267.M898011P52138.m
-rw------- 1 _dovecot mail 5813 Dec 26 00:10 1388038212.M972176P22064.m
-rw------- 1 _dovecot mail 3467 Jan 2 10:28 1388680099.M114308P15988.m
-rw------- 1 _dovecot mail 3434 Jan 2 10:31 1388680278.M267619P16164.m
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Resolved the issue
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.