imapserver: remove unreachable check for logindisabled

given the "false" flag above when opening the account by email.
the login disabled case is handled after the various auth mechanisms in a
single place.

noticed while making other changes.
This commit is contained in:
Mechiel Lukkien 2025-02-06 15:28:01 +01:00
parent e5e15a3965
commit 7b3ebb2647
No known key found for this signature in database

View File

@ -1966,12 +1966,6 @@ func (c *conn) cmdAuthenticate(tag, cmd string, p *parser) {
c.loginAttempt.Result = store.AuthBadCredentials
c.log.Info("failed authentication attempt", slog.String("username", username), slog.Any("remote", c.remoteIP))
xusercodeErrorf("AUTHENTICATIONFAILED", "bad credentials")
} else if errors.Is(err, store.ErrLoginDisabled) {
c.loginAttempt.Result = store.AuthLoginDisabled
c.log.Info("account login disabled", slog.String("username", username))
// No error code, we don't want to cause prompt for new password
// (AUTHENTICATIONFAILED) and don't want to trigger message suppression with ALERT.
xuserErrorf("%s", err)
}
xserverErrorf("looking up address: %v", err)
}