fix: emails are considered as medium spam by rspamd (#337)

This commit is contained in:
Alexander Lehmann
2025-03-16 17:46:45 +01:00
committed by GitHub
parent e45d9e970d
commit 39b7f6678c
2 changed files with 30 additions and 1 deletions

View File

@@ -45,7 +45,11 @@ func genAddressHeader(name string, addresses []Address, maxLength int) string {
} else {
email = fmt.Sprintf("<%s>", addr.Email)
}
writeHeaderQ(hl, addr.Name)
if isPrintableASCII(addr.Name) {
writeHeaderAtom(hl, addr.Name)
} else {
writeHeaderQ(hl, addr.Name)
}
writeHeaderAtom(hl, " ")
writeHeaderAtom(hl, email)
}