The number of sites that send mail to "foo@bar.com" when you give them "foo@sub.bar.com" is staggering, too. It's a mystery to me why they would ever want to do that, but it happens a lot.
var domain = addr.split(['@','.']).take_last(2)
var tld = domain[1]
// check TLD against wacky rules...
See, boss, it's easy. What's next?