If your disk was full and Mail couldn't save its preferences, then there's nothing you can do but restore the preference file from your backup, or, if you're one of those sorry bastards who don't keep backups, re-entering all your account info and then re-importing all your mailboxes from the ~/Library/Mail folder.