Fix SMTP submission HELO handling
This commit is contained in:
@@ -132,6 +132,15 @@ func TestLoadAlmaCredsFromFile(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestNormalizeSMTPHeloName(t *testing.T) {
|
||||
if got := normalizeSMTPHeloName("mail.example.invalid"); got != "mail.example.invalid" {
|
||||
t.Fatalf("got %q", got)
|
||||
}
|
||||
if got := normalizeSMTPHeloName("mailer"); got != "mailer.localdomain" {
|
||||
t.Fatalf("got %q", got)
|
||||
}
|
||||
}
|
||||
|
||||
func mustParseHTML(text string) *html.Node {
|
||||
doc, err := html.Parse(strings.NewReader(text))
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user