Skip navigation

Mail migration from SL Server to Lion Server

874 Views 6 Replies Latest reply: Jul 25, 2012 10:27 AM by ajisolpa RSS
zzCRP Level 1 Level 1 (0 points)
Currently Being Moderated
Jun 22, 2012 8:20 AM

Hi, I just installed a new Mac Mini Server preloaded with Lion Server, connecting it to a network that is already served by an older Mac Mini running Snow Leopard Server.


I would like to do a very slow step by step transition, starting with mail. So I have set up Lion Server's Directory to connect to SL's OD Server, and this appears to work, as Lion Server sees all users and groups as defined on SLS. For example, I can share folders via AFP on the new server to users authenticating via OD on SLS and everything appears fine.


Next step would be to migrate all the mail base from dovecot on SLS to dovecot on Lion Server. My plan is as follows:

1) shut down both mail services

2) copy all maildirs from SLS' maildir location to Lion's maildir location

3) make sure that permissions and ownerships are correct (all mail should be owned by _dovecot:mail)

4) activate ACLs in dovecot/conf.d/... and copy public folders to new location

5) copy sieve filters

6) modify router setup, so that packets arriving on imap port (i do not use pop) are routed to LS instead of SLS (this is for clients connecting from WAN)

7) modify DNS on SLS so that the fqdn address of the mail server points to the new machine (this is for clients connecting from LAN)

8) turn on mail service on LionServer


What do you think? Would this work? I have made some limited tests excluding steps 6 and 7, and it appears to work, but before making the big change, I wanted to hear if anyone has different experiences.


Many thanks


Mac mini, Mac OS X (10.7.4)
  • davidh Level 4 Level 4 (1,890 points)
  • MoisesRuiz Calculating status...
    Currently Being Moderated
    Jul 11, 2012 6:59 AM (in response to zzCRP)

    Everyone (including myself) refers back to that document but nobody has said if it actually works. I couldn't get it to work following the instructions.


    Please help?

  • ajisolpa Calculating status...
    Currently Being Moderated
    Jul 14, 2012 9:02 AM (in response to MoisesRuiz)

    I got here using Google because I'm embarking on a similar quest. I found this before which may be of your interest:

  • Moises R - OMTBA Calculating status...
    Currently Being Moderated
    Jul 16, 2012 7:08 AM (in response to ajisolpa)

    Hi ajisolpa,


    Thanks for the link but I'm not very comfortable with the command line and although I understand I couldn't make it work. Could you provide more detailed instructions on how you did it?


    When I do a normal upgrade from SLS, the Mail service seems to be successfully migrated but EVERYTHING else is all screwed up. DNS is not properly working, Open Directory is off, Wikis are not even working so instead I tried doing this:

    - Imaged my server to an external partition and upgraded it to Lion Server (DNS is screwed up but Mail's information seems ok although I don't think is fully functional because DNS and OD are all screwed up)

    - Installed and reconfigured a brand new Lion server with exactly the same DNS

    - Archived and restored the SLS Open Directory to the new Lion Server

    - Turned on and configured Mail in the new Lion server for the same domain

    - Turned off Mail on the Lion server and copied from migrated Lion Server: /var/spool/imap/dovecot/mail to the brand new Lion Server

    - I figured that since OD is restored with the same users and copying the db from the migrated Lion server will keep the same permissions then my procedure would work but it obviously didn't.


    Any ideas?

  • ajisolpa Level 1 Level 1 (0 points)
    Currently Being Moderated
    Jul 25, 2012 10:27 AM (in response to Moises R - OMTBA)

    What I did with moderate success:

    • -- A backup from the SL server installation I had + another separate backup of /var/spool/imap/dovecot directory.
    • -- Some other backups, for example Server Admin prefs, OD, Shared Files, etc.
    • -- Since the server was a mess, formatted the disk and installed Lion Server from scratch.
    • -- In my case, there was a mess with users and the way Mail was handled with virtual aliases, etc. I read about how the dovecot directory worked from the link provided before and decided to follow a similar approach, with some issues
      • -------- Created the new users in Lion Server and used the Server app to get into the Directory app and find the new user's GUIDs (about 30 users so it took a while but weren't too many).
      • -------- Looked up the old GUID for each user and pulled the corresponding mail directory from /var/spool/imap/dovecot/mail changing the directory name with the new name and
      • -------- IMPORTANT: also changing the owner as suggested on the link (i.e., _dovecot=read/write, everyone=none). These permission modifications need to be applied recursively, which is easier using terminal.
    • -- The issue with this method is that it seems to, sometimes(?), update the file modification dates, which in turn may cause on OS X and on iOS Mail to show incorrect dates for each e-mail on the mail list.
      • -------- I'm still reading about how to correct this issue I found with a particularly huge Inbox (50K+ mails, around 50GB, yikes).
      • -------- In my case the rest of the config was pretty simple, I used the Server app the setup DNS and Server Admin + modified postfix config file to suit some other requirements.

    I hope I'm staying on topic on this thread and that my experience can be of help, in case others run into the same issues.


    Message was edited by: ajisolpa for some reason post formatting does not show up.


More Like This

  • Retrieving data ...

Bookmarked By (1)


  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.