'Perform authentication for a username/password login.
Override the default lookup scheme to allow virtual domains.
@type user: L{bytes}
@param user: The name of the user attempting to log in.
@type password: L{bytes}
@param password: The password to authenticate with.
@rtype: L{Deferred} which successfully results in 3-L{tuple} of
(L{IMailbox <pop3.IMailbox>}, L{IMailbox <pop3.IMailbox>}
provider, no-argument callable)
@return: A deferred which fires when authentication is complete.
If successful, it returns an L{IMailbox <pop3.IMailbox>} interface,
a mailbox and a logout function. If authentication fails, the
deferred fails with an L{UnauthorizedLogin
<twisted.cred.error.UnauthorizedLogin>} error.'

def authenticateUserPASS(self, user, password):

    (user, domain) = self.lookupDomain(user)
    try:
        portal = self.service.lookupPortal(domain)
    except KeyError:
        return defer.fail(UnauthorizedLogin())
    else:
        return portal.login(UsernamePassword(user, password), None, pop3.IMailbox)
