First note the present order of your accounts. Turn off thunderbird and edit these two lines in ~/.mozilla-thunderbird/<your profile>/prefs.js to change the order of the accounts:
user_pref("mail.accountmanager.accounts", "account1,account3,account2,account4");
user_pref("mail.accountmanager.defaultaccount", "account1");
The default account is always first. Change the order of the other accounts.