How do I get Mozilla Thunderbird to automatically download email to a local folder?

This seems like it should be easy, but I can’t figure out how to do it. I’m using an IMAP mail server, and right now I’m manually copying emails over to my local folder every few days. How do I get Thunderbird to do it automatically when it retrieves my new mail?

You can use message filters, under the Tools menu, to re-direct mail to different folders depending on the message content, subject, sender etc.