How to activate Maildir support in Thunderbird

The mail.serverDefaultStoreContractID preference sets the default storage engine for new accounts and the mail.server.server5.storeContractID preference (substitute the number 9 with the given server id) stores the engine name/implementation for a specific server/account. The default value for these is @mozilla.org/msgstore/berkeleystore;1 standing for the mbox format and @mozilla.org/msgstore/maildirstore;1 stands for the Maildir format. The latter is experimental though and should be handled with care (ie. at least frequent backups).