Changing the default folder for Apple Mail...

In 2007 on this forum, D. Gimeno wrote the following helpful post about changing the default directory for Apple Mail. Would this still be valid in Lion? I want to keep OS and programs on 1 partition of my MiniMac's hard drive, and all content (including mail, contacts, calendars, and documents) on another and back it up using Time Machine. If this is still the way to do it - basically moving the stuff and changing the path accordingly - can I also do it with iCal and the Address book? Thanks y'all!


"Although I mostly agree with what the other participants have said, for completeness let me say that you can accomplish what you want using a symbolic link (‘symlink’):


1. Quit Mail.


2. Move the Mail folder from ~/Library/ to anywhere you wish, say to the root level of a disk called “External HD” (in which case the path to the Mail folder would be /Volumes/External HD/Mail).


3. Make sure the Mail folder is no longer in ~/Library/. If it’s still there, and you don’t want to delete it yet, just move it to the Desktop.


4. Open /Applications/Utilites/Terminal, type the following command and press <Return> (you can copy the command from this post, paste it in a text editor, edit the path there, copy it again, and paste it in Terminal):


ln -s "/Volumes/External HD/Mail" ~/Library/


This shall create in ~/Library/ a symbolic link called Mail that points to/Volumes/External HD/Mail. Alternatively, a 3rd party utility can be used to create the symbolic link instead of using Terminal.


This will work as long as the volume is mounted and the path to the actual Mail folder doesn’t change. If the path to the folder changes (because the disk is renamed or the folder is moved, for example), just quit Mail if it’s running, get rid of the symlink in ~/Library/, and create it again using the new path.


Note: For those not familiarized with the ~/ notation, it refers to the user’s home folder, i.e. ~/Library is the Library folder within the user’s home folder."

Posted on Oct 22, 2011 10:30 PM

Reply
45 replies

Oct 26, 2011 9:52 AM in response to etresoft

Hi etresoft


I have no wish to use a risky solution let alone take part in promoting its’ use.


Please can you expand the ‘fragile hack’ aspect and tell us what the ‘better alternatives’ are:

etresoft wrote:


Symbolic links are a fragile hack. I suggest you avoid them as there are far better alternatives.

...............



Am I understanding you correctly that the moved data should remain on the Start Up HDD?

etresoft wrote:

.........

The easiest solution is just to use a single partition. That is the way it is designed to work and I can guarantee it will be the path of least problems. ............................



I have 75% of my 8 TB Time Machine available, my calculations tell me it will see me through, or am I missing your point?

etresoft wrote:

............ If your Time Machine drive is too small, get a new one.

................


Again I may be missing a point but there was no intention to move the Home Directory?

etresoft wrote:

..............


If you must move your home directory, use a stable method such as System Preferences > Users &amp; Group > your account > command click > Advanced and change your home directory.

Oct 26, 2011 11:01 AM in response to Froggy Grodkin

I'm on my iPad. Otherwise I would include the quotes in context.


Using symbolic links is fine for simple tasks - especially those that are command-line based. When you have a fairly complex system like Apple Mail, using a link for the user directory could have unpredictable results. It wasn't designed for symbolic links. It will probably work fine, but when you go to upgrade the OS or migrate to a new computer, you might forget how you configured that customized setup. Then adding AddressBook and iCal into the mix starts to worry me. Plus, external drives may or may not have permissions enabled and that could cause problems.


Time Machine will only keep a single copy of anything if it doesn't change. If you have everything on one partition, you will have to backup the system files, but you only have to do that once. From then on out, only your user changes will be backed up. It is easy if you need to restore anything. I don't know how much Time machine will like those links, especially if you run Time Machine from within any of those apps where you are using links. As an added bonus, 10.7.2 can now create bootable Time Machine backups.


If you just can't do that, moving the entire home directory is a better supported method. Apple provides a way to do that. Everything should work. It is still slightly fragile because 3rd party software sometimes assumes your home directory is on /Users instead of checking it properly. You could have permissions issues with this too.

Oct 27, 2011 12:36 AM in response to etresoft

Thanks, Etresoft. Adding Mail, AddressBook, and iCal data in the mix after re-install is easy. I've checked that all the data are there - even in the TM backup, and they are easy to import into Mail, iCal, and Addresbook. Just did that a few times because I got new computers - even switched from PC to Mac. No special setup needed.


In iTunes, Apple was smart enough to add the option of changing the default folder for storing your music. Why is this so inconceivable for Calendar, AddresBook, and Mail? It's all the same - user content. Maybe I'm old fashioned, but I want all my stuff on 1 volume and all system and application stuff on another.


But... you made me think of the new Time Machine options... Being old fashioned is 1 thing, but mentally I'm still flexible enough to switch if there seems to be a better solution ;-) .

Oct 27, 2011 5:49 AM in response to etresoft

Thanks for your time explaining the background to this situation etresoft it is very much appreciated.


I completed my reply about 05.00 hours GMT and when I posted the message Apple had decided to ‘update’ the Forums and it hung on a ‘We will be back soon’ screen. Sadly the text was lost because I could not get back to the original page.


I have very basic knowledge of this subject so please bear with me.


I guess it is past experiences with computing, like jjphvn I have kept OS and Applications separate from Data as a matter of general practice.

When Time Machine was introduced I enthusiastically welcomed the technology, there were never any issues with Files and Folders being recovered but experiences with system recovery were fraught with problems. Despite TM getting better with the passage of time I have continued to treat it with caution.

My MO for system recovery is to use a Cloned OS, this also serves to enable the continued use of Snow Leopard needed on occasion to run items that Lion refuses to handle.

I carried out a fresh installation of Lion on a clean HDD because after finding a resolution to the Wi Fi dropping out every five minutes the repaired system sadly exhibited too many signs of other issues.

I did not want to contaminate the fresh installation system and was reluctant to transfer anything to it from TM, fortunately I was able to copy Mail via Snow Leopard and AddressBook and iCal from my iPhone, although I would have to repeat the process to remember the steps taken.

The Simlink ‘solution’ seemed ideal to avoid this scenario being necessary in future, that is the reason I became interested in it. Unfortunately there were no warnings ‘on the packaging’.


Your information about TM has sparked a desire to do some avid reading on the subject I hope to be able to see it in a completely new light.

I appreciate the situation of TM being tripped up or at least being confused by the Folders being moved to a different HDD.

However since they would not be any data stored in the Folders on the OS HDD and TM would back up the working Folders from the Data HDD [and if necessary restore them to the location if needed] would it really matter?

Your point on the subject of Third Party Software is accepted without question.


You are obviously advocating the use of a single HDD, in your view are there any reasons why Data, like files generated by MS Office Applications or Google SketchUp should not be stored on a separate HDD?


Thanks again for a very informative and interesting post.

Oct 27, 2011 8:28 AM in response to jjphvn

Remember that there are two parts to Time Machine. There is the backup and there is the restore. It is a good idea to test both of those before you need them to make sure you are comforrtable with the technology and that it actually works. In addition to restoring from the Finder, you can also run Time Machine from within many applications like Mail and AddressBook.


Any time you start customizing the system, you start introducing risks. We all do this to one degree or another. Everyone, including Apple, expects this. Once you go past the standard, default configurations and into advanced settings and then into homegrown solutions, you are adding more and more levels of risk. At each stage, there is less and less chance that anyone has tested that particular configuration. Developers try very hard to be robust, but it is not an exact science. There is nothing wrong with pushing your system into new territory. Just remember that the new territory is uncharted and untested. It is your responsibility to do that exploring and testing in your own before you settle down and get comfortable.


Apple realizes that iTunes is not like Mail and people are going to want to share their music libraries. Therefore, Apple developed and supports a number of ways to share iTunes data. Plus, iTunes libraries are sometimes very large so it often makes sense to move it to another disk. For Mail, AddressBook, and Calendar, there really isn't any technical reason to move it - just user preference. There are some technical reasons why your entire home directory might be on a different drive, and that is supported.

Oct 27, 2011 8:40 AM in response to Froggy Grodkin

The biggest difference is that some applications store their data in a bundle of related files - multiple data files, indexes, etc. You usually should be careful with making changes to the internals of such bundles. Mail, AddressBook, iCal, iTunes, and iPhoto, just to name a few, all do this. Applications that save individual documents can save them anywhere you want.


There is a vast amount of bias and misinformation regarding Time Machine. For some reason, these Apple forums are often the worst at bashing Time Machine. Time Machine offers a number of benefits over cloning tools. As of 10.7.2, Time Machine can even be configured to have a bootable recovery partition too. Clones are very good for archiving a snapshot of a system for those times, such as major system upgrades, when you know, ahead of time, that you need a backup. Time Machine is best for all the other occasions when you realize, sometimes weeks later, that you needed a backup. That is why it is called Time Machine. It allows you to go back in time and have a good backup after you realize you needed. Clones just can't do that.

Oct 22, 2012 11:13 PM in response to Greendrake

Hmmm... weird, I have no problem searching anywhere. Did you select the folder you want to search in?


And Etresoft - by now I am happily using Time Machine, since it can backup external drives as well. There may even come a time when I put my Mail, iCal, and Address Book folders back where they belong ;-)...! But as of now, I am too scared I loose anything when I move on to a new computer, or crash...

Feb 15, 2013 9:04 AM in response to jjphvn

Hi Guys - I finally found a good reason to restore the simlinks to their original state, i.e. with the Mail, AddressBook and Calendar folders in the original Library. Time Machine does not back up IMAP mailboxes in the simlink situation, as I quite uncomfortably found out 2 days ago. The lost mail has been restored, thank God, but with the recent improvements on Time Machine (for example now effortlessly backing up external drives as well), I see no reason anymore to keep those 3 folders in an unorthodox place. Question of course is - how di I de-activate the simlinks? Via Terminal? Any help is greatly appreciated.

Jan 19, 2014 8:08 AM in response to J. van Nispen

I am reading this discussion for the first time now (January 2014).


I have a similar issues - wanting to store Apple Mail outside of the normal place. I use CarbonCopyCloner (and I am sure there are other similar backup programs) and I wish to have it keep archives of data files. Therefore, in effect I wish to set the program to backup ~/Documents. It would be possible to pick and choose the particular Mail files in ~/Library but that is a hassle and I certainly do not need archive versions of the vast majority of what else is in ~/Library. (If I need it, it is probably sufficiently up to date in a TimeMachine backup).


Therefore seems like using a symbolic link to a location in ~/Documents wold solve the problem. And, as long as thiis folder is not excluded from TimeMachine, it is backed up there too.


@J_Van_Nispen - you know you can include external drives in your TM backup - so linking to files there does not preclude them being backed up in TM.


@etresoft - I note your warnings re fragility in symbolic links. I guess on balance, I am prepared to run this risk given the advantages of having Mail in a more sensible location.

Jan 19, 2014 12:37 PM in response to norman56

Hi Norman,


thanks for dropping in. I use CCC as well - excellent. And TM. My user files and system files are on the same drive but in different partitions.


Nevertheless, I'm seriously considering removing the symbolic links, because ever since I updated to Mavericks, the Contacts on my MacMini don't sync anymore - with iCloud. Works fine with iPhone 4S and iPad, but my wife (using symlinks as well) has the same problem. Very, VERY frustrating when trying to send 500 Christmas greetings, I can tell you! I started threads elswhere on this forum about this, but even when I'm not the only one having the problem, nobody has a solution so far. So I wanna try removing the symlink, but that's quite an operation, and I still haven't found the exact script and time to do it.


Cheers -


J.

Jan 19, 2014 2:03 PM in response to jjphvn

J


Thanks for the warning there too. I have not yet noticed symlink induced problems - but then I am still trying to work out how syncronize Contacts & Calendars consistently between home computer (10.6.8), work computer (10.8), and google and iOS devices! Ah well, maybe I should just buy a new computer for home so it can run Mavericks - but based on what I read elsewhere even that rout does not sound foolproof.


Good luck


N

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Changing the default folder for Apple Mail...

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.