diff --git a/offlineimap/imapserver.py b/offlineimap/imapserver.py index 79163f2..311ab89 100644 --- a/offlineimap/imapserver.py +++ b/offlineimap/imapserver.py @@ -199,6 +199,11 @@ class IMAPServer(object): http://tools.ietf.org/html/rfc4616""" authc = self.username + if not authc: + raise OfflineImapError("No username provided for '%s'" + % self.repos.getname(), + OfflineImapError.ERROR.REPO) + passwd = self.__getpassword() authz = b'' if self.user_identity != None: