How to change the Mail "Archive" folder for email account/s?

On OS X 10.8.3, in Mail, is there a way to change the account folder that the "Archive" button sends the mail messages to?
For example, on GMail it should go into "All Mail".


Solution 1:

I found the answer here.

  1. Close Mail;
  2. Go to /Users/<username>/Library/Mail/V2/MailData/;
  3. Edit Accounts.plist (make a backup just in case);
  4. Find the key-string pair:
    <key>ArchiveMailboxName</key>
    <string>Archive</string>
  5. Change the <string> tag value to your desired archive folder name, e.g. [Gmail]/All Mail or All Mail depending on your account folder naming scheme.
  6. Save the file;
  7. Reopen Mail

The Archive folder(s) will now apear with their own icon on the left pane and not as regular folders.

You can also add an archive button to the toolbar.