#18: implement SMTP Submission (587/465), SASL PLAIN/LOGIN auth and preflight diagnostics
This commit is contained in:
1 parent
7249419efc
commit
d56f29d084
70 files changed
+5163
-659
No files matched your search
@@ -11,9 +11,9 @@ type DomainName struct {
|
||||
}
|
||||
|
||||
var (
|
||||
ErrDomainNameEmpty = errors.New("domain name: must not be empty")
|
||||
ErrDomainNameNotFQDN = errors.New("domain name: must contain at least one dot (not a FQDN)")
|
||||
ErrDomainNameInvalidLabel = errors.New("domain name: label must not start or end with a hyphen")
|
||||
ErrDomainNameEmpty = errors.New("domain name: must not be empty")
|
||||
ErrDomainNameNotFQDN = errors.New("domain name: must contain at least one dot (not a FQDN)")
|
||||
ErrDomainNameInvalidLabel = errors.New("domain name: label must not start or end with a hyphen")
|
||||
)
|
||||
|
||||
// NewDomainName validates and normalizes raw into a DomainName.
|
||||
|
||||
@@ -14,9 +14,9 @@ type EmailAddress struct {
|
||||
}
|
||||
|
||||
var (
|
||||
ErrEmailMissingAtSign = errors.New("email address: missing '@' separator")
|
||||
ErrEmailEmptyLocalPart = errors.New("email address: local part must not be empty")
|
||||
ErrEmailEmptyDomain = errors.New("email address: domain must not be empty")
|
||||
ErrEmailMissingAtSign = errors.New("email address: missing '@' separator")
|
||||
ErrEmailEmptyLocalPart = errors.New("email address: local part must not be empty")
|
||||
ErrEmailEmptyDomain = errors.New("email address: domain must not be empty")
|
||||
ErrEmailLocalPartTooLong = errors.New("email address: local part exceeds 64 octets (RFC 5321 4.5.3.1.1)")
|
||||
)
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ type MessageID struct {
|
||||
}
|
||||
|
||||
var (
|
||||
ErrMessageIDEmpty = errors.New("message id: must not be empty")
|
||||
ErrMessageIDEmpty = errors.New("message id: must not be empty")
|
||||
ErrMessageIDNotBracketed = errors.New("message id: must be wrapped in angle brackets")
|
||||
)
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ func TestSpamVerdictFromScore_MatchesThresholds(t *testing.T) {
|
||||
{3.9, SpamHam},
|
||||
{4, SpamProbable},
|
||||
{8.9, SpamProbable},
|
||||
{9, SpamReject}, // section 10.1: 9-15 greylists/defers, modeled here as reject-eligible
|
||||
{9, SpamReject}, // section 10.1: 9-15 greylists/defers, modeled here as reject-eligible
|
||||
{15.1, SpamReject},
|
||||
}
|
||||
for _, c := range cases {
|
||||
|
||||
Reference in new issue
Block a user