exclude failed tls certs, add auth debug log

This commit is contained in:
Aine
2022-11-16 10:40:27 +02:00
parent 919ee46ba4
commit 14751cbf3a
2 changed files with 3 additions and 0 deletions

View File

@@ -137,6 +137,7 @@ func (m *Manager) loadTLSConfig(certs, keys []string) {
tlsCert, err := tls.LoadX509KeyPair(path, keys[i])
if err != nil {
m.log.Error("cannot load SSL certificate: %v", err)
continue
}
certificates = append(certificates, tlsCert)
}

View File

@@ -22,6 +22,7 @@ type mailServer struct {
// Login used for outgoing mail submissions only (when you use postmoogle as smtp server in your scripts)
func (m *mailServer) Login(state *smtp.ConnectionState, username, password string) (smtp.Session, error) {
m.log.Debug("Login state=%+v username=%+v", state, username)
if !utils.AddressValid(username) {
return nil, errors.New("please, provide an email address")
}
@@ -42,6 +43,7 @@ func (m *mailServer) Login(state *smtp.ConnectionState, username, password strin
// AnonymousLogin used for incoming mail submissions only
func (m *mailServer) AnonymousLogin(state *smtp.ConnectionState) (smtp.Session, error) {
m.log.Debug("AnonymousLogin state=%+v", state)
return &incomingSession{
ctx: sentry.SetHubOnContext(context.Background(), sentry.CurrentHub().Clone()),
getRoomID: m.bot.GetMapping,