do not perform MX and SMTP checks at all when they are disabled

This commit is contained in:
Aine
2022-11-17 23:34:14 +02:00
parent 2e712e0a67
commit e38d4b2fc5
6 changed files with 31 additions and 24 deletions

View File

@@ -13,12 +13,20 @@ import (
"gitlab.com/etke.cc/postmoogle/utils"
)
// ErrBanned returned to banned hosts
var ErrBanned = &smtp.SMTPError{
Code: 554,
EnhancedCode: smtp.EnhancedCode{5, 5, 4},
Message: "please, don't bother me anymore, kupo.",
}
var (
// ErrBanned returned to banned hosts
ErrBanned = &smtp.SMTPError{
Code: 554,
EnhancedCode: smtp.EnhancedCode{5, 5, 4},
Message: "please, don't bother me anymore, kupo.",
}
// ErrNoUser returned when no such mailbox found
ErrNoUser = &smtp.SMTPError{
Code: 550,
EnhancedCode: smtp.EnhancedCode{5, 5, 0},
Message: "no such user here, kupo.",
}
)
type mailServer struct {
bot matrixbot