Copying Mail settings between Mac OS X installations

I've just installed a fresh copy of Lion on my machine and much to my dismay I have to set up all of my many mail filtering rules again!

Bugger that, instead I had a dig around and decided to copy across the rules from my previous installation. All the rules you've set up are stored in a .plist file within Mail's data stored in your Library folder.

In Lion you'll find the rules at:

~/Library/Mail/V2/MailData/MessageRules.plist

Under Snow Leopard:

~/Library/Mail/MessageRules.plist

So all you need to do is copy/paste the relevant file from your old machine to the new one.

Edit

It's worth noting that you can copy Smart Mailboxes and RSS feeds across as well.

Smart Mailboxes:

Lion: ~/Library/Mail/V2/MailData/SmartMailboxes.plist
Snow Leopard: ~/Library/Mail/SmartMailboxes.plist

RSS Feeds (both OSes):

~/Library/Mail/RSS/

- Chris