mirror of
https://github.com/foxcpp/maddy.git
synced 2025-04-03 05:07:38 +03:00
#736: dmarc evalute added check if fromDomain is a TLD
This commit is contained in:
parent
5bb56e3777
commit
72416b0456
1 changed files with 4 additions and 0 deletions
|
@ -207,6 +207,10 @@ func isAligned(fromDomain, authDomain string, mode AlignmentMode) bool {
|
|||
return strings.EqualFold(fromDomain, authDomain)
|
||||
}
|
||||
|
||||
tld, _ := publicsuffix.PublicSuffix(fromDomain)
|
||||
if strings.EqualFold(fromDomain, tld) {
|
||||
return strings.EqualFold(fromDomain, authDomain)
|
||||
}
|
||||
orgDomainFrom, err := publicsuffix.EffectiveTLDPlusOne(fromDomain)
|
||||
if err != nil {
|
||||
return false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue