In Leopard's Mail, select an IMAP folder that is stored on the server, and select Get Account Info (control-click on the account to see this option, or press Command-I). In the Account Info window is a Subscription List tab. Using this tab, one should be able to unsubscribe to Gmail's "All Mail" folder, thus reducing the number of messages stored locally, and the number of messages unread by a factor of two.
[robg adds: A couple of comments from users on the queue review site further clarify this hint...
Comment #1: "Still doesn't work for me on my Linux dovecot IMAP server, Apple Mail's subscription tab just shows up empty and disabled, just like it always did, even though subscribing to only specific mailboxes work just fine in Thunderbird or even Microsoft Outlook, using the same server."
Comment #2: "My Gmail folders do not appear in the Subscription List. The usefulness of the hint is for people who have Exchange accounts. My university has a huge Public folder on its Exchange server. The old Mail.app would spend a lot of time indexing every item (thousands) in every sub-folder. Now you can simply unsubscribe from them. It seems as though all of the Public folders were unsubscribed by default (a wise move).]
Mac OS X Hints
http://hints.macworld.com/article.php?story=20071118092032249