mirror of
https://github.com/foxcpp/maddy.git
synced 2025-04-04 21:47:40 +03:00
Merge pull request #737 from mschneider82/master
#736: dmarc evalute added check if fromDomain is a TLD
This commit is contained in:
commit
fd40288271
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)
|
return strings.EqualFold(fromDomain, authDomain)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tld, _ := publicsuffix.PublicSuffix(fromDomain)
|
||||||
|
if strings.EqualFold(fromDomain, tld) {
|
||||||
|
return strings.EqualFold(fromDomain, authDomain)
|
||||||
|
}
|
||||||
orgDomainFrom, err := publicsuffix.EffectiveTLDPlusOne(fromDomain)
|
orgDomainFrom, err := publicsuffix.EffectiveTLDPlusOne(fromDomain)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue