Bug/fix mail tests

this fixes all imap tests for now.