MacSpecialistGermany

Q: mail partition on a per user basis (like in OS X 10.6 server)

I am setting up a new OS X 10.11 Server. In 10.6 I could set an alternate partition location on a per user level for the location mail would store its files for this specific user with Workgroup manager. Cant find this option in ServerApp anywhere and cant seem to be able to set it with serveradmin in terminal ether. Haven't found a key in directory utility to fiddle around with ether.

 

I know that I could use SymLinks: after generating the user mail folder in the default location I could copy that folder to a new location, delete it in the original location and generate a symlink there pointing to the copied folder in the new location.

 

Does anyone know a more GUI approach to this? Thanks.

Server.app, OS X El Capitan (10.11.2)

Posted on Dec 13, 2015 10:06 PM

Close

Q: mail partition on a per user basis (like in OS X 10.6 server)

  • All replies
  • Helpful answers

  • by John Lockwood,Solvedanswer

    John Lockwood John Lockwood Dec 14, 2015 2:21 AM in response to MacSpecialistGermany
    Level 6 (9,349 points)
    Servers Enterprise
    Dec 14, 2015 2:21 AM in response to MacSpecialistGermany

    OS X stores copies of emails in the users Library folder, the Library folder is a sub-folder of their home directory.

     

    The path to a users home directory can be summarised as

     

    ~/Library

     

    The path to a users Mail files can be summarised as

     

    ~/Library/Mail

     

    The first obvious approach would be to create a Symbolic Link (symlink) to a different location as you mention, one could do this manually in Terminal.app as a permanent change so that the same new location is used on each login.

     

    It is also possible with both Workgroup Manager and Profile Manager to define folder redirection rules, these rules basically automate creating symbolic links to the new location. This allows telling OS X to look in a different to normal location. However you need to be careful about this. If the contents of the new location are not preserved between each login then not only will the user have to keep downloading all the emails each time they login but there settings like email signatures will not be preserved either.

  • by MacSpecialistGermany,

    MacSpecialistGermany MacSpecialistGermany Dec 14, 2015 2:54 AM in response to John Lockwood
    Level 1 (0 points)
    Dec 14, 2015 2:54 AM in response to John Lockwood

    yes, this is true on the client side. But there I don't have a problem. What I need is the server side where all 50+ mail accounts with 100G+ size and 50k+ Mailcount each reside. The btree of HFS+ cant handle very large amounts of files very well. DiskWarrior cant repair a singe volume because it runs out of memory on a 16GB machine!! Therefore I have to split the mailboxes over several volumes on the server side.

    This is what I am looking for.

  • by John Lockwood,

    John Lockwood John Lockwood Dec 14, 2015 3:05 AM in response to MacSpecialistGermany
    Level 6 (9,349 points)
    Servers Enterprise
    Dec 14, 2015 3:05 AM in response to MacSpecialistGermany

    The Folder Redirection ability of Workgroup Manager and Profile Manager equally applies to Network Home directories as well as Local Home directories. However the additional information you have provided suggests this will not help in your particular case.

     

    You can also split the hard drive on the server in to multiple partitions and share them each for network home directories and allocate portions of users to each partition.

     

    DiskWarrior 5 is also supposed to be a lot more efficient and capable with very large volumes.

     

    You would use Workgroup Manager to set each user as to which shared partition their home directory is on. You can select multiple users at a time. If you move the entire users home directory to a different partition you will not need to mess about with folder redirection.

     

    Hypothetically each user could have their own partition but that would be too much work.

  • by MacSpecialistGermany,

    MacSpecialistGermany MacSpecialistGermany Dec 14, 2015 3:19 AM in response to John Lockwood
    Level 1 (0 points)
    Dec 14, 2015 3:19 AM in response to John Lockwood

    yes John, this is all great on the client side and I am making heavy use of that. Splitting home directories over several servers and partitions. And DiskWarrior 5 is much better, but still gets problems if the btree gets multiple GB large. Its not the way OS X handles home directories etc. its the way the imap mail server puts ALL of the files of ALL of the users onto ONE volume on the server side. This is where I need to split the data. In OS X 10.6 server one could just tell on wich volume a particular user should have the mails stored server side. With 10.11 this option seems to be gone. I have a solution with symlinks for this, but hope that there is a better one.

  • by John Lockwood,

    John Lockwood John Lockwood Dec 14, 2015 3:46 AM in response to MacSpecialistGermany
    Level 6 (9,349 points)
    Servers Enterprise
    Dec 14, 2015 3:46 AM in response to MacSpecialistGermany

    The Mail server storage is a totally separate issue to users storage. In fact most administrators use a physically separate server as the mail server. I run Kerio Connect as our Mail server on a Mac mini under Yosemite 10.10.5. As this Mac mini is dedicated to using Kerio Connect I don't need Server.app installed so I have not done so, not that that makes any difference to file counts and HFS+ issues. I have the Mail files stored on an external RAID system.

     

    I don't know the exact amount that is actual emails as other files are on that dedicated volume as well i.e. email archives, config files, etc. but I can tell you that single volume has well over 6million files on it and is using 1.8TB of disk space. This Mail server has no problems at all handling that. (Just done some quick estimates and I would say that of that > 6million files > 6million are individual emails.

     

    Most people consider Kerio Connect to be a vastly superior solution compared to Apple's own Mail server but this is more on both an ease of admin basis, and feature basis rather than performance basis.

     

    If you are using your boot disk to store your email files on your mail server then I would change this so that a separate volume is used as your mail store. I would also make sure it is not doing double duty i.e. is not hosting network home directories.

  • by MacSpecialistGermany,

    MacSpecialistGermany MacSpecialistGermany Dec 14, 2015 5:20 AM in response to John Lockwood
    Level 1 (0 points)
    Dec 14, 2015 5:20 AM in response to John Lockwood

    Hi John, that is exactly what I do. A Mac Pro works as mail server and the files are stored on a TB2 8 drive SSD Raid 6 with 5.5TB of space. The 70+ users make heavy use of that server. Volume used is actually at 2.5TB and growing fast at around 1TB a year. Kerio is a nice product but a 100 user license has a price tag. The additional functionality wasn't needed so far and the OS X mail server is just fine for my needs.

     

    And here the question again: does anyone know of a easy way (GUI as in OS X 10.6 workgroup manager) to sprinkle my mail accounts over several partitions on the mail server storage without using manuel symlinks?

  • by John Lockwood,

    John Lockwood John Lockwood Dec 14, 2015 5:30 AM in response to MacSpecialistGermany
    Level 6 (9,349 points)
    Servers Enterprise
    Dec 14, 2015 5:30 AM in response to MacSpecialistGermany

    Disk Utility should show you the total number of files on that volume for a comparison. I don't believe it is feasible to split the server message store.

  • by MacSpecialistGermany,

    MacSpecialistGermany MacSpecialistGermany Dec 14, 2015 5:57 AM in response to John Lockwood
    Level 1 (0 points)
    Dec 14, 2015 5:57 AM in response to John Lockwood

    but this is exactly what I would like to do. I am at 4Mio files at the moment, growing fast. So end of 2016 I will have 6Mio files etc. The server should do its job for the next 3-5 years, so i would like to plan ahead. Since HFS+ isn't the best IO system, I would like to split my data into smaller portions. One can really feel the difference between a disk with 2Mio+ files and one with only a few files. My empirical is that a drive with 2Mio+ files starts to slow down extreme when it comes to a lot of small file IO. The one big file still get transferred quickly, but a lot of small ones aren't. But thanks for your suggestions.

  • by John Lockwood,

    John Lockwood John Lockwood Dec 14, 2015 6:41 AM in response to MacSpecialistGermany
    Level 6 (9,349 points)
    Servers Enterprise
    Dec 14, 2015 6:41 AM in response to MacSpecialistGermany

    Unfortunately the nature of emails is that they are lots of small individual file transfers. If the clients are regularly connecting to the server to get new emails most of the time they do not have to transfer that many since they are only getting new ones.

     

    Also unfortunately the nature of IMAP is that because it has been designed to cope with multiple devices using the same amount, it has to regularly double-check the content and status of all messages between the copy on each client and the server. This ensures deleted messages are synced, moved messages are synced, and message flags are synced between all the devices.

     

    I cannot see it being possible to split the message store for Apple Mail Server, the users own copy in their home directory can be done as previously discussed.

     

    If it is of help the underlying software Apple use is DoveCot as the IMAP server and Postfix as the SMTP server.

     

    I am not seeing performance issues I can attribute to our mail server which currently has more emails than yours. I have seen performance issues relating to network home directories.

     

    Note: Kerio allows splitting a domain across multiple servers so that a sub-set of users are on each server. See http://kb.kerio.com/product/kerio-connect/kerio-connect-multi-server/kerio-conne ct-multi-server-1667.html This is also of course possible with 'real' Microsoft Exchange servers. It used to be possible a long time ago with Apple's own Mail server but is no longer possible. We have not had to split our Kerio server in to a multi server setup.