I would love to know how to do this.
I use gmail and imap, and on the whole searching messages is great. But Gmail's spam folder is synced, and these often show up in results.
I don't want to enable Mail's built-in junk filter, because Gmail's is fine, and Apple's gives me lots of false positives.
I can't seem to find a way not to sync the imap spam folder, to hide it, or to automatically delete the messages in it periodically. Can anyone help?