Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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
Question marked as Best reply

Posted on Oct 23, 2011 12:10 AM

I can confirm that this works for Mail and Address Book on Lion.


On Snow Leopard, and now on Lion, I keep the directories for both Mail and Address Book in an encrypted sparsebundle image, with symbolic links from their standard locations, i.e. from


~/Library/Mail

~/Library/Application\ Support/AddressBook


Both Mail and Address Book work without any problems. As yet I haven't tried this for iCal on Lion,( but expect it to work).

45 replies

Oct 24, 2011 7:10 AM in response to jjphvn

...is the shortcut icon (the folder with the arrow in the lower left corner) proof enough?


Should be.


• Re Command-clicking the name in the title bar -


The gray area at the top of a window is the titlebar (so called because it contains the name {= title} of the window). Command-click the name of the window -

User uploaded file


and you'll be presented with the path in list form -

User uploaded file


Re clicking an item in the path shown at the bottom of a Finder (folder) window, it actually needs double-clicking.

Oct 24, 2011 10:40 AM in response to jjphvn

Froggy -


I found the Address book in Home/Library/Application Support. The operation works out perfectly with Mail, but obviously, I don't want to screw up with the other 2. I copied the AddresBook folder to the dsired volume (MAC HD) and removed it from the Home Library. So now, do I type the following into Terminal...?


ln -s "/Volumes/MAC HD/AddressBook" ~/Library/Application Support/


Or is this different because of the sub folder?


For iCal, I found the folder Calendars in the Home root - just like Mail, so that should be a little easier, without any subfolder.


Cheers,


Joris.

Oct 24, 2011 8:59 PM in response to jjphvn

In the following Moved_Data refers to the Name of the HDD where you intend to store the data from the appropriate Applications.


For Mail type in:


ln -s "/Volumes/Moved_Data/Mail" ~/Library/



For AddressBook type in:


ln -s "/Volumes/Moved_Data/AddressBook" ~/Library/Application\ Support/AddressBook


NB. Observe the Backward Slash after 'Application' in "Application Support".

Unfortunately in posting this string is displaying on two lines. There is a Single Space between the Backslash after Application and Support:


Application\ Support


However it still copies correctly.



For iCal [iCals Data is stored in Calendars]type in:


ln -s "/Volumes/Moved_Data/iCal" ~/Library/Calendars



If you want to place the Folder being moved into a Folder on Moved_Data HDD, e.g., A Folder Named XYZ, the path for Mail would read would read:


ln -s "/Volumes/Moved_Data/XYZ/Mail" ~Library/



Making entries in Terminal:

Many users find the best way to make entries in Terminal by Copying and Pasting, but do this carefully. Terminal needs to know the full command string but nothing more.

You may find it convenient to copy and paste one of the commands above into TextEdit, alter the target HDD Name appropriately and then copy and paste that command into Terminal?

Oct 24, 2011 11:13 PM in response to Froggy Grodkin

Ok Frogyy, thanx. It worked with Address book too. Using your iCal line, however, iCal stays empty (no such file), which, I think, is because the line should read (in my case):


ln -s " /Volumes/MAC HD/Calendars/" ~/Library/Calendars


instead of iCal after HD/. Am I wrong?


Then, if I try to correct this line in Terminal, it says: file exists. So - still assuming it should read 'Calendars' instead of 'iCal' - the next question is... how can I erase a 'wrong' line via Terminal in order to re-enter the correct one?


Meanwhile, I found the System configuration folder, but browsing the files in there, I could not find the one with these lines with the symbolic links as yet...

Oct 25, 2011 7:32 AM in response to jjphvn

Okay, everything is fine now. Using Froggy's terminology, what worked for me in Lion were these commands in Terminal:


ln -s "/Volumes/Moved_Data/Mail" ~/Library/

ln -s "/Volumes/Moved_Data/Calendars" ~/Library/

ln -s "/Volumes/Moved_Data/AddressBook" ~/Library/Application\ Support/AddressBook


Thanks and have fun y'all!

Oct 26, 2011 5:47 AM in response to jjphvn

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


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. If your Time Machine drive is too small, get a new one.


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 9:36 AM in response to etresoft

Hi Etresoft, thanks for your warning. Can you explain what could happen with the symbolic links?


What I am looking for is a way to backup only my documents, calendar, e-mail, and address book. All the rest is software - including Lion - and can easily be re-installed. My jewels are now on another volume than all system software and applications, and backed up to an external drive using Time Machine. I can't think of a happier way to live...

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 ID.