mirror of
https://github.com/mjl-/mox.git
synced 2025-07-13 06:54:38 +03:00
normalize localparts with unicode nfc when parsing
both when parsing our configs, and for incoming on smtp or in messages. so we properly compare things like é and e+accent as equal, and accept the different encodings of that same address.
This commit is contained in:
@ -85,9 +85,6 @@ func CanonicalLocalpart(localpart smtp.Localpart, d config.Domain) (smtp.Localpa
|
||||
if d.LocalpartCatchallSeparator != "" {
|
||||
t := strings.SplitN(string(localpart), d.LocalpartCatchallSeparator, 2)
|
||||
localpart = smtp.Localpart(t[0])
|
||||
if localpart == "" {
|
||||
return "", fmt.Errorf("empty localpart")
|
||||
}
|
||||
}
|
||||
|
||||
if !d.LocalpartCaseSensitive {
|
||||
|
Reference in New Issue
Block a user