Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Forcing the default mailbox in Mail Apps
Here's one for those of you who have a number of accounts set up in Mail.app. I recently got really frustrated with Mail, because I could find no way of setting the default mailbox to show when the app launched or a new viewer was shown. It used to be set up right for my needs, but somehow the default mailbox got set to my UNIX mail account, and I wanted it to show my IMAP account by default. Could I do this with the GUI - no! I think the preferences got corrupted at some point, but I'm not sure.

You can set the default mailbox by editing:

~/Library/Preferences/com.apple.mail.plist

Near the top of that file is an array called 'ActiveUniViewers'. On my system it has one item; change that item to point to the required default mailbox. Mailboxes are listed in ~/Library/Mail/, and you should be able to figure out the right mailbox from the directory name. If you have an IMAP account with user foo, at host blah.com, the box will be IMAP:foo@blah.com/ in the ~/Library/Mail/ directory. Set the array item to be:

~/Library/Mail/IMAP:foo@blah.com/INBOX.imapbox

The exact mailbox name can be found by examining the account's directory. Save (remember to back up first) and hey-presto! My mailbox preferences are back!.

It used to be the case that Mail remembered the last mailbox looked at, but I can't get that to work - ideas welcome, but for the moment, here's a way to get Mail to display your mailbox of choice when you click it's icon.

[Editor's note: On my machine, switching accounts still works as expected; Mail remembers the last active setting on quit. I would think that trashing the prefs file might also fix the problem, and I'm curious why Mail would be able to update other prefs in the file but not the ActiveUniViewers setting. Hopefully this may help others with the same problem...any comments on the cause or the solution?]
    •    
  • Currently 3.75 / 5
  You rated: 4 / 5 (4 votes cast)
 
[8,099 views]  

Forcing the default mailbox in Mail | 2 comments | Create New Account
Click here to return to the 'Forcing the default mailbox in Mail' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Configure the default mailbox in Mail
Authored by: el_barto_2002 on Apr 15, '02 03:15:13PM

Hello:

Did you know that you can drag the email accounts in the list in the Preferences Dialog to arrange them in the order you want to appear in the popup menu in a new email window? The first account will be the default account.

Hope this help.

El Barto



[ Reply to This | # ]
you can also use the defaults command
Authored by: piers on Apr 16, '02 10:03:03PM
the defaults command (see "man defaults") provides a command line interface to reading and editing the defaults database. Depending on the type of changes and on the size of the preference file, this may or may not be easier than editing the preference file by hand.

Regarding the hint at hand, the appropriate commands would be:

defaults read com.apple.mail ActiveUniViewers

and
defaults write com.apple.mail ActiveUniViewers

'("~/Library/Mail/Mailboxes/WhateverNameYouLike.mbox")'


I formatted the second command on two lines for easier reading, you should enter this on a single line, separated by a space

[ Reply to This | # ]