make staticcheck happy

i don't think it's actually better, but it is helpful to keep the code base
free of staticcheck findings.
This commit is contained in:
Mechiel Lukkien 2024-03-31 15:30:24 +02:00
parent 9c5d234162
commit 96e3e5e33e
No known key found for this signature in database

View file

@ -1687,22 +1687,18 @@ func (c *conn) isSMTPUTF8Required(part *message.Part) bool {
return false
}
// Check "MAIL FROM"
// Check "MAIL FROM".
if hasNonASCII(strings.NewReader(string(c.mailFrom.Localpart))) {
return true
}
// Check all "RCPT TO"
// Check all "RCPT TO".
for _, rcpt := range c.recipients {
if hasNonASCII(strings.NewReader(string(rcpt.rcptTo.Localpart))) {
return true
}
}
// Check header in all message parts
if hasNonASCIIPartHeader(part) {
return true
}
return false
// Check header in all message parts.
return hasNonASCIIPartHeader(part)
}
// ../rfc/5321:1992 ../rfc/5321:1098