Module: MailAuth::Domain
- Defined in:
- lib/mailauth/domain.rb
Overview
One spelling for a domain name, so two of them can be compared. An internationalized domain travels both as the U-label a person reads (münchen.example) and the A-label DNS and DKIM's d= carry (xn--mnchen-3ya.example); comparing those byte-wise fails DMARC alignment on perfectly good mail.
Class Method Summary collapse
Class Method Details
.normalize(name) ⇒ Object
11 12 13 14 15 |
# File 'lib/mailauth/domain.rb', line 11 def normalize(name) name = printable(name).strip.chomp(".") ascii(name).downcase end |