domains with generic second-level-domains like ac.at. should be interpreted like toplevel domains.
This commit is contained in:
parent
0274e0d299
commit
4fa76393e6
1 changed files with 2 additions and 2 deletions
|
@ -24,9 +24,9 @@ metrics = OpenStruct.new(
|
||||||
|
|
||||||
def determine_domain str
|
def determine_domain str
|
||||||
case str
|
case str
|
||||||
when /@([^.]+\.[^.]+)\z/
|
when /@([^.]+\.(?:(?:co|ac)\.)?[^.]+)\.?\z/
|
||||||
$1
|
$1
|
||||||
when /\.([^.]+\.[^.]+)\z/
|
when /\.([^.]+\.(?:(?:co|ac)\.)?[^.]+)\?.\z/
|
||||||
"any.#$1"
|
"any.#$1"
|
||||||
when 'MAILER-DAEMON'
|
when 'MAILER-DAEMON'
|
||||||
'MAILER-DAEMON'
|
'MAILER-DAEMON'
|
||||||
|
|
Loading…
Add table
Reference in a new issue