Start up Thunderbird, open the Config Editor (Tools -> Options -> Advanced -> General -> Config Editor), and change the mail.server.default.check_all_folders_for_new setting to true.
Or in newer versions: Thunderbird menu -> Preferences -> Preferences -> Advanced -> General -> Config Editor
Source: here