diff --git a/bot/access.go b/bot/access.go index 31064c2..5fc04a1 100644 --- a/bot/access.go +++ b/bot/access.go @@ -3,6 +3,7 @@ package bot import ( "context" "regexp" + "strings" "gitlab.com/etke.cc/go/mxidwc" "maunium.net/go/mautrix/id" diff --git a/smtp/msa.go b/smtp/msa.go index b146854..71d50b2 100644 --- a/smtp/msa.go +++ b/smtp/msa.go @@ -36,8 +36,7 @@ func (m *msa) Login(state *smtp.ConnectionState, username, password string) (smt return nil, errors.New("please, provide an email address") } - mailbox := utils.Mailbox(username) - if !m.bot.AllowAuth(mailbox, password) { + if !m.bot.AllowAuth(username, password) { return nil, errors.New("email or password is invalid") }