core, plugin imap, plugin smtp: fixed SMTP/IMAP integration. /!\ Profile need to be connected for IMAP server to work (will change in the future)

This commit is contained in:
Goffi 2013-01-08 00:46:38 +01:00
commit 2596ea291b
3 changed files with 8 additions and 6 deletions

View file

@ -426,11 +426,10 @@ class SatProfileCredentialChecker:
profiles = self.host.memory.getProfilesList()
if not credentials.username in profiles:
return defer.fail(cred_error.UnauthorizedLogin())
password = self.host.memory.getParamA("Password", "Connection", profile_key=credentials.username)
return defer.maybeDeferred(
credentials.checkPassword,
password).addCallback(
self._cbPasswordMatch, credentials.username)
d = self.host.memory.asyncGetParamA("Password", "Connection", profile_key=credentials.username)
d.addCallback(lambda password: credentials.checkPassword(password))
d.addCallback(self._cbPasswordMatch, credentials.username)
return d
class ImapServerFactory(protocol.ServerFactory):
protocol = imap4.IMAP4Server