This is an applescript that allows you to move mail selected in mail.app into a folder based on the email's month and year. I created it because I like to maintain an archive of my email sorted by month. You can download the latest version from here. No warranty at is available: use at your own risk. Documentation is included in the script.
When combined with the Act-On plugin, this means that I can keep email that still needs actioning in my INBOX. When I've finished, I hit a key, and the email is filed in the correct place.
Since most IMAP account also have quota limits, the script is also designed to allow you to make an offline archive of older mail. To make the most use of this, you will need to create an IMAP archive locally, following these instructions: An Email Archive with Tiger and OS X.