Skip to content

Commit

Permalink
handle alternative domain names for protonmail
Browse files Browse the repository at this point in the history
  • Loading branch information
hashbangblob committed Jun 5, 2024
1 parent 6d2a158 commit 186674e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions domains.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,10 @@ var yandexDomains = []string{
"yandex.asia",
"yandex.mobi",
}

var protonmailDomains = []string{
"protonmail.ch",
"protonmail.com",
"proton.me",
"pm.me",
}
6 changes: 5 additions & 1 deletion normalizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,14 @@ func NewNormalizer() *Normalizer {
rules[domain] = yandexRule
}

protonmailRule := &ProtonmailRule{}
for _, domain := range protonmailDomains {
rules[domain] = protonmailRule
}

appleRule := &AppleRule{}
rules["icloud.com"] = appleRule
rules["me.com"] = appleRule
rules["protonmail.ch"] = &ProtonmailRule{}
rules["emailsrvr.com"] = &RackspaceRule{}
rules["zoho.com"] = &ZohoRule{}
return &Normalizer{rules: rules}
Expand Down

0 comments on commit 186674e

Please sign in to comment.