Don’t do this: GMail and Mail in OS X 10.5
There’s some advice that says that you can/should map the “all mail” label in GMail’s imap implementation to the “trash” folder in Mail (or any other imap client, really), the intended effect being that when you delete something, it only gets archived, instead of moved into some frankly annoying deleteditems label that starts cluttering up your folder tree and label view.
I did that. I now have some new advice:
Don’t do that.
It breaks Mail on OS X 10.5. I don’t know about 10.4, but essentially what happens is that Mail gets into some sort of loop trying to set flags on 500 items in the “all mail” folder whenever it tries to do anything with trash, which is – for some reason – quite frequently. That wouldn’t be a problem were it not for the fact that apparently deadlocking on that task prevents any new mail from appearing in the inbox. So.
Setting “use this” folder for “all mail” in Mail in 10.5 for “trash” is considered harmful.
Google has more information in a GMail help article, recommended IMAP client settings (it’s been updated since you last looked at it, probably).